2006-03-29 19:40:14 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-04-04 06:28:21 +08:00
|
|
|
set -v
|
2006-03-29 19:40:14 +08:00
|
|
|
set -e
|
|
|
|
|
2010-11-30 23:29:42 +08:00
|
|
|
if [ -z "$AUTOBUILD_INSTALL_ROOT" ] ; then
|
|
|
|
echo "This script is only meant to be used with an autobuild server."
|
|
|
|
echo "Please see INSTALL for build instructions."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-04-10 03:19:01 +08:00
|
|
|
rm -rf MANIFEST dist/*
|
|
|
|
|
|
|
|
# support version-id changes
|
|
|
|
export AUTOBUILD_OVERRIDE_VERSION=y
|
|
|
|
|
|
|
|
python setup.py sdist
|
|
|
|
|
2013-04-04 06:28:21 +08:00
|
|
|
python setup.py build
|
|
|
|
python setup.py test
|
2013-04-10 03:19:01 +08:00
|
|
|
python setup.py install --root=$AUTOBUILD_INSTALL_ROOT
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2013-04-04 06:28:21 +08:00
|
|
|
which /usr/bin/rpmbuild > /dev/null 2>&1 || exit 0
|
2006-03-29 19:40:14 +08:00
|
|
|
|
2013-04-04 06:28:21 +08:00
|
|
|
if [ -n "$AUTOBUILD_COUNTER" ]; then
|
2006-03-29 19:40:14 +08:00
|
|
|
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
|
2013-04-04 06:28:21 +08:00
|
|
|
else
|
2006-03-29 19:40:14 +08:00
|
|
|
NOW=`date +"%s"`
|
|
|
|
EXTRA_RELEASE=".$USER$NOW"
|
|
|
|
fi
|
2013-04-10 03:19:01 +08:00
|
|
|
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean dist/*.tar.gz
|
2006-03-29 19:40:14 +08:00
|
|
|
|