-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·54 lines (45 loc) · 950 Bytes
/
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
52
53
54
#!/bin/bash
run_clean()
{
rm -rf build dist shellwrap.egg-info
}
run_build()
{
python3 setup.py sdist bdist_wheel
}
run_install()
{
pip3 install shellwrap-0.0.1-py3-none-any.whl
}
run_test()
{
python3 -m unittest discover -s ./ -p '*test.py'
}
run_lint()
{
pylint shellwrap
#pylint *.py shellwrap \
# --disable=duplicate-code \
# --extension-pkg-allow-list=math \
# --ignore-patterns=".*\.md,.*\.sh,.*\.html,pylintrc,LICENSE,build,dist,tags,shellwrap.egg-info"
}
# Process the command line arguments
while getopts "hcbitlu" opt
do
case ${opt} in
h) run_help ;;
c) run_clean ;;
b) run_build ;;
i) run_install ;;
t) run_test ;;
l) run_lint ;;
u) pip3 uninstall shellwrap ;;
v) set_version $OPTARG ;;
*) help ; exit ;;
esac
done
# default, no options given, run these tasks
if [[ $# -eq 0 ]] ; then
run_lint
run_test
fi