Skip to content

Commit

Permalink
Update build script and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Aug 20, 2017
1 parent b2c96f9 commit a701b5f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 32 deletions.
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
13 changes: 13 additions & 0 deletions requirements/requirements-trusty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Parsley==1.2
Twisted==16.0.0
cffi==1.5.2
cryptography==1.2.3
enum34==0.9.23
idna==2.0
pyOpenSSL==0.15.1
pyasn1==0.1.9
pycparser==2.10
service_identity==16.0.0
six==1.5.2
transaction==1.1.1
zope.interface==4.0.5
13 changes: 13 additions & 0 deletions requirements/requirements-xenial.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Parsley==1.2
Twisted==16.0.0
cffi==1.5.2
cryptography==1.2.3
enum34==1.1.2
idna==2.0
pyOpenSSL==0.15.1
pyasn1==0.1.9
pycparser==2.14
service_identity==16.0.0
six==1.10.0
transaction==1.4.3
zope.interface==4.1.3
26 changes: 11 additions & 15 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ usage() {
echo "Valid options:"
echo " -h"
echo -e " -t tagname (build specific release/branch)"
echo -e " -d distribution (available: precise, trusty, wheezy, jessie)"
echo -e " -d distribution (available: trusty, xenial, wheezy, jessie)"
echo -e " -n (do not sign)"
echo -e " -p (push on repository)"
}

DISTRIBUTION="precise"
TARGETS="trusty xenial wheezy jessie"
DISTRIBUTION="trusty"
TAG="master"
NOSIGN=0
PUSH=0
Expand All @@ -37,18 +38,12 @@ while getopts "d:t:np:h" opt; do
esac
done

if [ "$DISTRIBUTION" != "all" ] &&
[ "$DISTRIBUTION" != "precise" ] &&
[ "$DISTRIBUTION" != "trusty" ] &&
[ "$DISTRIBUTION" != "wheezy" ] &&
[ "$DISTRIBUTION" != "jessie" ]; then
if ! [[ $TARGETS =~ $DISTRIBUTION ]] && [[ $DISTRIBUTION != 'all' ]]; then
usage
exit 1
fi

if [ "$DISTRIBUTION" == "all" ]; then
TARGETS="precise trusty wheezy jessie"
else
if [ "$DISTRIBUTION" != 'all' ]; then
TARGETS=$DISTRIBUTION
fi

Expand Down Expand Up @@ -89,14 +84,15 @@ for TARGET in $TARGETS; do
cp -r $BUILDSRC $BUILDDIR
cd $BUILDDIR/Tor2web

rm debian/control
rm debian/control requirements.txt

if [ "$TARGET" == 'xenial' ]; then
ln -s controlX/control.$TARGET debian/control
else
ln -s controlX/control.trusty debian/control
if [ "$TARGET" != 'xenial' ]; then
TARGET='trusty'
fi

cp debian/controlX/control.$TARGET debian/control
cp requirements/requirements-$TARGET.txt requirements.txt

sed -i "s/stable; urgency=/$TARGET; urgency=/g" debian/changelog

if [ $NOSIGN -eq 1 ]; then
Expand Down
6 changes: 2 additions & 4 deletions scripts/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ sudo apt-get update -y

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

rm -rf requirements.txt
ln -s requirements/requirements-xenial.txt requirements.txt
pip install -r requirements.txt
pip install coverage coveralls

coverage run setup.py test # tests still to be implemented
coveralls || true

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

1 comment on commit a701b5f

@cheako
Copy link

@cheako cheako commented on a701b5f Aug 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at this.

The error has changed from needing 0.3.2 to 0.3.3.

Please sign in to comment.