summaryrefslogtreecommitdiffstats
path: root/autobuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'autobuild.sh')
-rwxr-xr-xautobuild.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/autobuild.sh b/autobuild.sh
new file mode 100755
index 0000000..35fa4fc
--- /dev/null
+++ b/autobuild.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -v
+set -e
+
+: ${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
+
+which /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