-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcreate_release.sh
46 lines (39 loc) · 1.43 KB
/
create_release.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
echo Setting environment
export PYTHONPATH=$PWD:$PWD/stracker/externals
echo Cleaning up old version
cd stracker
rm -f stracker_linux_x86.tgz
rm -rf dist
rm -rf build
echo Setting up python environment
# Setting up the env and installing/upgrading takes forever,
# so only do it once a day, or if it hasn't been done yet
if find env/linux/lastcheck -mtime 0 > /dev/null
then
. env/linux/bin/activate
else
virtualenv env/linux
. env/linux/bin/activate
echo Installing/upgrading packages
pip install --upgrade bottle
pip install --upgrade cherrypy
pip install --upgrade psycopg2
pip install --upgrade python-dateutil
pip install --upgrade wsgi-request-logger
pip install --upgrade simplejson
pip install --upgrade pyinstaller
# This is so incredibly slow, and no way to auto-upgrade
if ! pip show apsw
then
pip install https://github.com/rogerbinns/apsw/releases/download/3.35.4-r1/apsw-3.35.4-r1.zip \
--global-option=fetch --global-option=--version --global-option=3.35.4 --global-option=--all \
--global-option=build --global-option=--enable-all-extensions
fi
touch env/linux/lastcheck
fi
pyinstaller --clean -y -s --exclude-module http_templates --hidden-import cherrypy.wsgiserver.wsgiserver3 --hidden-import psycopg2 stracker.py
mv dist/stracker dist/stracker_linux_x86
tar cvzf stracker_linux_x86.tgz -C dist stracker_linux_x86
rm -rf dist
rm -rf build
exit 0