forked from HDFGroup/hsds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·43 lines (37 loc) · 952 Bytes
/
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
#!/bin/bash
run_pyflakes=1
if [ $# -gt 0 ]; then
if [ $1 == "-h" ] || [ $1 == "--help" ]; then
echo "Usage: build.sh [--nolint]"
exit 1
fi
if [ $1 == "--nolint" ]; then
echo "no pyflakes"
run_pyflakes=
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 .
command -v docker
if [ $? -ne 1 ]; then
echo "clean stopped containers"
docker rm -v $(docker ps -aq -f status=exited)
echo "building docker image"
docker build -t hdfgroup/hsds .
fi