2021-04-08 06:37:51 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euox pipefail
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
|
2021-08-30 04:17:57 +00:00
|
|
|
bazel build //tools/... //projects/reqman
|
2021-04-08 06:37:51 +00:00
|
|
|
|
2021-05-15 17:34:28 +00:00
|
|
|
DIRS=(projects tools)
|
2021-04-08 06:37:51 +00:00
|
|
|
|
2021-08-30 04:17:57 +00:00
|
|
|
function brl() {
|
|
|
|
bin="$1"
|
|
|
|
shift
|
2021-10-11 03:42:55 +00:00
|
|
|
bazel build "//${bin}"
|
|
|
|
"bazel-bin/${bin}/$(basename ${bin})" "$@"
|
2021-08-30 04:17:57 +00:00
|
|
|
return "$?"
|
|
|
|
}
|
|
|
|
|
2021-10-11 03:42:55 +00:00
|
|
|
for d in "${DIRS[@]}"; do
|
|
|
|
brl tools/autoflake --remove-all-unused-imports -ir $(realpath "$d")
|
|
|
|
brl tools/isort $(realpath "$d")
|
|
|
|
brl tools/unify --quote '"' -ir $(realpath "$d")
|
|
|
|
done
|
|
|
|
|
2021-08-30 04:17:57 +00:00
|
|
|
brl projects/reqman clean tools/python/requirements.txt
|