summaryrefslogtreecommitdiffstats
path: root/autobuild.sh
blob: b3beaf12c6aac7516dc8a06ce1abde72a5702c9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -ve

: ${AUTOBUILD_INSTALL_ROOT="$HOME/builder"}

rm -rf MANIFEST dist build


python setup.py sdist

python setup.py build
python setup.py test
python setup.py install --root="$AUTOBUILD_INSTALL_ROOT"

type -p /usr/bin/rpmbuild > /dev/null 2>&1 || exit 0

if [ -n "$AUTOBUILD_COUNTER" ]; then
    EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
    NOW=`date +"%s"`
    EXTRA_RELEASE=".$USER$NOW"
fi
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean dist/*.tar.gz