-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·51 lines (38 loc) · 1.05 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
set -eo pipefail
# disable TTY allocation
TTY=""
if [[ ! -t 1 ]]; then
TTY="-T"
fi
DC="${DC:-run}"
function _docker_compose {
docker compose "${DC}" ${TTY} "${@}"
}
function build {
: "Build docker compose file"
docker compose build
}
function build:no-cache {
: "Build docker compose file (no cache used)"
docker compose build --no-cache
}
function sky_beam:lrun {
: "Run Sky-Beam with docker compose, and runs any command in arguments"
_docker_compose sky_beam python -m sky_beam.main "${@}"
}
function file_linters {
: "Run file_linter docker container with docker compose, and runs any command in arguments"
_docker_compose file_linters "${@}"
}
function run_file_linters {
: "Execute File Linters, which are Black, isort, and Flake8"
printf "\n---Running isort Import Sorter---\n"
file_linters isort .
printf "\n---Running Black Code Formatting---\n"
file_linters black .
printf "\n---Running flake8 Inspector---\n"
file_linters flake8 .
}
END_TIME_FORMAT=$"\n\Execution completed in %3lR"
time "${@:-help}"