File: autobuild.sh

package info (click to toggle)
virtinst 0.500.3-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,084 kB
  • ctags: 2,393
  • sloc: python: 14,166; xml: 5,181; sh: 126; makefile: 6
file content (26 lines) | stat: -rwxr-xr-x 648 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -v
set -e

rm -rf build dist python-virtinst.spec MANIFEST

python setup.py build
python setup.py test
python setup.py install --prefix=$AUTOBUILD_INSTALL_ROOT

VERSION=`python setup.py --version`
cat python-virtinst.spec.in | sed -e "s/::VERSION::/$VERSION/" > python-virtinst.spec
python setup.py sdist

if [ -f /usr/bin/rpmbuild ]; then
  if [ -n "$AUTOBUILD_COUNTER" ]; then
    EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
  else
    NOW=`date +"%s"`
    EXTRA_RELEASE=".$USER$NOW"
  fi
  rpmbuild --define "extra_release $EXTRA_RELEASE" \
           --define "_sourcedir `pwd`/dist" \
           -ba --clean python-virtinst.spec
fi