-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from appthrust/test
Add plugin for buildifier
- Loading branch information
Showing
4 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
{ | ||
"name": "Ubuntu", | ||
"name": "appthrust/proto-toml-plugin", | ||
"image": "mcr.microsoft.com/devcontainers/base:jammy", | ||
"runArgs": ["--platform=linux/amd64"], | ||
"workspaceFolder": "/workspace", | ||
"remoteEnv": { | ||
"PATH": "/root/.proto/shims:/root/.proto/bin:${containerEnv:PATH}" | ||
}, | ||
"customizations": { | ||
"jetbrains": { | ||
"backend": "IntelliJ" | ||
} | ||
}, | ||
"postCreateCommand": ".devcontainer/setup.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# buildifier plugin | ||
|
||
[buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier#linter) plugin for [proto](https://github.com/moonrepo/proto). | ||
|
||
## Installation | ||
|
||
This is a community plugin and is thus not built-in to proto. In order to use it, first either add it to your global or project-based `.prototools` by running: | ||
|
||
### Global install | ||
|
||
```shell | ||
proto plugin add buildifier "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/buildifier/plugin.toml" --global | ||
proto install buildifier | ||
``` | ||
|
||
### Per-project install | ||
|
||
```shell | ||
proto plugin add buildifier "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/buildifier/plugin.toml" | ||
proto pin buildifier latest --resolve | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { run } from "../testkit.js"; | ||
|
||
run({ | ||
name: "sccache", | ||
afterInstall: async ($) => { | ||
await $`sccache --version`; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# A TOML plugin for buildifier | ||
# https://moonrepo.dev/docs/proto/plugins#toml-plugin | ||
|
||
name = "buildifier" | ||
type = "cli" | ||
|
||
[platform.linux] | ||
bin-path = "buildifier" | ||
download-file = "buildifier-linux-{arch}" | ||
checksum-file = "checksums.txt" | ||
|
||
[platform.macos] | ||
bin-path = "buildifier" | ||
download-file = "buildifier-darwin-{arch}" | ||
checksum-file = "checksums.txt" | ||
|
||
[platform.windows] | ||
bin-path = "buildifier.exe" | ||
download-file = "buildifier-windows-{arch}.exe" | ||
checksum-file = "checksums.txt" | ||
|
||
[install] | ||
download-url = "https://github.com/bazelbuild/buildtools/releases/download/v{version}/{download_file}" | ||
|
||
[install.arch] | ||
aarch64 = "arm64" | ||
x86_64 = "amd64" | ||
|
||
[resolve] | ||
git-url = "https://github.com/bazelbuild/buildtools" |