forked from HDFGroup/hsds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·48 lines (42 loc) · 1.05 KB
/
build.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
#!/bin/bash
run_pyflakes=1
run_docker=1
if [ $# -gt 0 ]; then
if [ $1 == "-h" ] || [ $1 == "--help" ]; then
echo "Usage: build.sh [--nolint | --no-docker]"
exit 1
fi
if [ $1 == "--nolint" ]; then
echo "no pyflakes"
run_pyflakes=
fi
if [ $1 == "--no-docker" ]; then
echo "no docker"
run_docker=
fi
fi
if [ $run_pyflakes ]; then
echo "running pyflakes on hsds"
if [ $(./pyflakes.sh -count hsds) -ge 1 ]; then
echo "pyflakes errors in hsds..."
./pyflakes.sh hsds
exit 1
fi
echo "running pyflakes on hsds/util"
if [ $(./pyflakes.sh -count hsds/util) -ge 1 ]; then
echo "pyflakes errors in hsds/util..."
./pyflakes.sh hsds/util
exit 1
fi
fi
pip install --upgrade build
echo "running build"
python -m build
pip install -v .
if [ $run_docker ]; then
command -v docker
echo "clean stopped containers"
docker rm -v $(docker ps -aq -f status=exited)
echo "building docker image"
docker build -t hdfgroup/hsds .
fi