-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpre-release
executable file
·45 lines (38 loc) · 1.01 KB
/
pre-release
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
#!/bin/bash
source ./venv/bin/activate
# check that no pending DB changes
python manage.py migrate | grep makemigrations
if [ "$?" == "0" ]; then
echo "Pending DB changes, run python manage.py makemigrations and commit changes first"
exit 1
fi
# automatic tests
python manage.py test
if [ "$?" != "0" ]; then
echo "Automatic tests reported problems, terminating release"
exit 1
fi
echo "Automatic tests ok, proceeding..."
# prospector
prospector -i htmlcov
if [ "$?" != "0" ]; then
echo "Prospector reported problems, terminating release"
exit 1
fi
echo "Prospector cleared build, proceeding..."
# mypy
mypy `./venv/bin/python ./manage.py apps`
if [ "$?" != "0" ]; then
echo "Mypy reported problems, terminating release"
exit 1
fi
echo "Mypy cleared build, proceeding..."
# pytype
pytype `./venv/bin/python ./manage.py apps`
if [ "$?" != "0" ]; then
echo "Pytype reported problems, terminating release"
exit 1
fi
echo "Pytype cleared build, proceeding..."
echo "Pre-release script ok"
exit 0