mirror of
https://github.com/peridotbuild/peridot.git
synced 2024-10-08 08:54:12 +00:00
Scripts
This commit is contained in:
parent
de0c3c0b10
commit
8d6e92c777
19
scripts/addlicense
Executable file
19
scripts/addlicense
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
bazel build //vendor/github.com/google/addlicense
|
||||
bin_path="bazel-bin/vendor/github.com/google/addlicense/addlicense_/addlicense"
|
||||
|
||||
$bin_path \
|
||||
-c "Peridot Authors" \
|
||||
-ignore "vendor/**" \
|
||||
-ignore "third_party/**" \
|
||||
-ignore "node_modules/**" \
|
||||
-ignore ".ijwb/**" \
|
||||
-ignore ".idea/**" \
|
||||
-ignore ".vscode/**" \
|
||||
-ignore "pnpm-lock.yaml" \
|
||||
-ignore ".api-linter.yaml" \
|
||||
-v \
|
||||
.
|
@ -11,5 +11,16 @@ for d in $(find vendor -iname build); do
|
||||
echo '' > $(dirname $d)/BUILD.bazel
|
||||
done
|
||||
|
||||
# run nfv2 to generate replace entries for generated content
|
||||
# we don't want to invoke bazel all the time so check if it's built already
|
||||
if [[ ! -f bazel-bin/devtools/nfv2/nfv2_/nfv2 ]]; then
|
||||
bazel build //devtools/nfv2
|
||||
fi
|
||||
# it's meant to be run with bazel but it only requires the workspace directory env
|
||||
BUILD_WORKSPACE_DIRECTORY="$(pwd)" bazel-bin/devtools/nfv2/nfv2_/nfv2
|
||||
|
||||
bazel run //:gazelle
|
||||
bazel run //:gazelle-update-repos
|
||||
# we don't care about the local repository warnings from updating the deps.bzl file
|
||||
# obviously ignoring all errors is stupid, but the warnings are too noisy
|
||||
# todo(mustafa): figure out a filter for the warnings
|
||||
bazel run //:gazelle-update-repos 2>/dev/null
|
||||
|
10
scripts/lintproto
Executable file
10
scripts/lintproto
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
bazel build //vendor/github.com/googleapis/api-linter/cmd/api-linter
|
||||
bin_path="bazel-bin/vendor/github.com/googleapis/api-linter/cmd/api-linter/api-linter_/api-linter"
|
||||
|
||||
$bin_path \
|
||||
$(find . -name "*.proto" ! -path "./vendor/*" ! -path "./third_party/*" ! -path "./node_modules/*" ! -path "./bazel-*") \
|
||||
-I . \
|
||||
-I third_party/googleapis \
|
||||
--config .api-linter.yaml
|
Loading…
Reference in New Issue
Block a user