Skip to content

Commit a701b5f

Browse files
committed
Update build script and dependencies
1 parent b2c96f9 commit a701b5f

File tree

5 files changed

+40
-32
lines changed

5 files changed

+40
-32
lines changed

requirements.txt

-13
This file was deleted.

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requirements/requirements-xenial.txt

requirements/requirements-trusty.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Parsley==1.2
2+
Twisted==16.0.0
3+
cffi==1.5.2
4+
cryptography==1.2.3
5+
enum34==0.9.23
6+
idna==2.0
7+
pyOpenSSL==0.15.1
8+
pyasn1==0.1.9
9+
pycparser==2.10
10+
service_identity==16.0.0
11+
six==1.5.2
12+
transaction==1.1.1
13+
zope.interface==4.0.5

requirements/requirements-xenial.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Parsley==1.2
2+
Twisted==16.0.0
3+
cffi==1.5.2
4+
cryptography==1.2.3
5+
enum34==1.1.2
6+
idna==2.0
7+
pyOpenSSL==0.15.1
8+
pyasn1==0.1.9
9+
pycparser==2.14
10+
service_identity==16.0.0
11+
six==1.10.0
12+
transaction==1.4.3
13+
zope.interface==4.1.3

scripts/build.sh

+11-15
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ usage() {
77
echo "Valid options:"
88
echo " -h"
99
echo -e " -t tagname (build specific release/branch)"
10-
echo -e " -d distribution (available: precise, trusty, wheezy, jessie)"
10+
echo -e " -d distribution (available: trusty, xenial, wheezy, jessie)"
1111
echo -e " -n (do not sign)"
1212
echo -e " -p (push on repository)"
1313
}
1414

15-
DISTRIBUTION="precise"
15+
TARGETS="trusty xenial wheezy jessie"
16+
DISTRIBUTION="trusty"
1617
TAG="master"
1718
NOSIGN=0
1819
PUSH=0
@@ -37,18 +38,12 @@ while getopts "d:t:np:h" opt; do
3738
esac
3839
done
3940

40-
if [ "$DISTRIBUTION" != "all" ] &&
41-
[ "$DISTRIBUTION" != "precise" ] &&
42-
[ "$DISTRIBUTION" != "trusty" ] &&
43-
[ "$DISTRIBUTION" != "wheezy" ] &&
44-
[ "$DISTRIBUTION" != "jessie" ]; then
41+
if ! [[ $TARGETS =~ $DISTRIBUTION ]] && [[ $DISTRIBUTION != 'all' ]]; then
4542
usage
4643
exit 1
4744
fi
4845

49-
if [ "$DISTRIBUTION" == "all" ]; then
50-
TARGETS="precise trusty wheezy jessie"
51-
else
46+
if [ "$DISTRIBUTION" != 'all' ]; then
5247
TARGETS=$DISTRIBUTION
5348
fi
5449

@@ -89,14 +84,15 @@ for TARGET in $TARGETS; do
8984
cp -r $BUILDSRC $BUILDDIR
9085
cd $BUILDDIR/Tor2web
9186

92-
rm debian/control
87+
rm debian/control requirements.txt
9388

94-
if [ "$TARGET" == 'xenial' ]; then
95-
ln -s controlX/control.$TARGET debian/control
96-
else
97-
ln -s controlX/control.trusty debian/control
89+
if [ "$TARGET" != 'xenial' ]; then
90+
TARGET='trusty'
9891
fi
9992

93+
cp debian/controlX/control.$TARGET debian/control
94+
cp requirements/requirements-$TARGET.txt requirements.txt
95+
10096
sed -i "s/stable; urgency=/$TARGET; urgency=/g" debian/changelog
10197

10298
if [ $NOSIGN -eq 1 ]; then

scripts/travis.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ sudo apt-get update -y
66

77
sudo apt-get install -y debhelper devscripts dh-apparmor dh-python python python-pip python-setuptools python-sphinx
88

9+
rm -rf requirements.txt
10+
ln -s requirements/requirements-xenial.txt requirements.txt
911
pip install -r requirements.txt
10-
pip install coverage coveralls
11-
12-
coverage run setup.py test # tests still to be implemented
13-
coveralls || true
1412

1513
./scripts/build.sh -d trusty -t $TRAVIS_COMMIT -n

0 commit comments

Comments
 (0)