2021-04-08 06:37:51 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euox pipefail
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
bazel build //tools/python/...
|
|
|
|
|
2021-08-04 06:16:55 +00:00
|
|
|
DIRS=(tools projects)
|
2021-04-08 06:37:51 +00:00
|
|
|
|
2021-08-30 04:17:57 +00:00
|
|
|
function brl() {
|
|
|
|
bin="$1"
|
|
|
|
shift
|
|
|
|
bazel build "//${bin}"
|
|
|
|
"bazel-bin/${bin}/$(basename ${bin})" "$@"
|
|
|
|
return "$?"
|
|
|
|
}
|
2021-04-08 06:37:51 +00:00
|
|
|
|
2021-08-30 04:17:57 +00:00
|
|
|
brl tools/autoflake -r "${DIRS[@]}"
|
|
|
|
brl tools/isort --check "${DIRS[@]}"
|
|
|
|
brl tools/unify --quote '"' -cr "${DIRS[@]}"
|
|
|
|
brl tools/reqman lint tools/python/requirements.txt
|
2021-04-08 06:37:51 +00:00
|
|
|
|
2021-08-30 04:17:57 +00:00
|
|
|
# OpenAPI specific junk
|
2021-04-08 06:37:51 +00:00
|
|
|
for f in $(find . -type f -name "openapi.yaml"); do
|
2021-08-30 04:17:57 +00:00
|
|
|
brl tools/openapi "${f}" && echo "Schema $f OK"
|
|
|
|
brl tools/yamllint -c tools/yamllint/yamllintrc "${f}"
|
2021-04-08 06:37:51 +00:00
|
|
|
done
|