-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage
executable file
·58 lines (47 loc) · 898 Bytes
/
manage
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
52
53
54
55
56
57
58
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
if [ -f .env ]
then
source .env
fi
init () {
poetry install
}
tests () {
export AWS_ACCESS_KEY_ID='testing'
export AWS_SECRET_ACCESS_KEY='testing'
export AWS_SECURITY_TOKEN='testing'
export AWS_SESSION_TOKEN='testing'
export AWS_DEFAULT_REGION='testing'
poetry run pytest -sv -vv --cov=vapor tests/
poetry run coverage report -m
# Github actions will setup CI
if [ "${CI:-}" = "true" ]
then
poetry run coveralls
fi
}
lint () {
init
poetry run pylint vapor tests
}
clean () {
rm -rf vapor.egg-info build dist
}
list () {
grep -E "()\ ?{$" "$0" | grep -v 'grep ' | awk '{print $1}' | sort
}
# main start here
command=${1:-""}
if [[ -n $(type -t "${command}") ]] && [[ $(type -t "${command}") = function ]]
then
shift
eval "$command" "$@"
exit $?
fi
case "$command" in
*)
list
esac