virt-manager/autobuild.sh

33 lines
702 B
Bash
Raw Normal View History

2006-03-29 19:40:14 +08:00
#!/bin/sh
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
rm -rf MANIFEST dist/*
# support version-id changes
export AUTOBUILD_OVERRIDE_VERSION=y
python setup.py sdist
python setup.py build
python setup.py test
python setup.py install --root=$AUTOBUILD_INSTALL_ROOT
2006-03-29 19:40:14 +08:00
which /usr/bin/rpmbuild > /dev/null 2>&1 || exit 0
2006-03-29 19:40:14 +08:00
if [ -n "$AUTOBUILD_COUNTER" ]; then
2006-03-29 19:40:14 +08:00
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
2006-03-29 19:40:14 +08:00
NOW=`date +"%s"`
EXTRA_RELEASE=".$USER$NOW"
fi
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean dist/*.tar.gz
2006-03-29 19:40:14 +08:00