3 read oldrev newrev head
4 if [ $head != 'dev' ]; then
5 echo "error: head not recognized: $head" >&2
9 git ls-tree $newrev packages/ \
10 | grep ^160000\ commit \
11 | while read x y newsubrev packagepath; do
12 # XXX deal with new packages
13 # XX deal with removed packages
14 oldsubrev=$(git ls-tree $oldrev $packagepath | perl -lane 'print $F[2]')
15 if [ $newsubrev == $oldsubrev ]; then
19 echo "must build $packagepath at new version $newsubrev"
29 svnuri="$(invirt-getconf svn.uri)"
32 if [ $# -eq 0 ] ; then
33 echo " usage: invirt-build-release package_name [package_name [...]]"
38 rm -rf build-release/$package
39 svn export $svnuri/trunk/packages/$package build-release/$package
40 cd build-release/$package
42 eval $(perl -ne 'print if s/^(Version|Source|Distribution): /\1=/' \
43 <(dpkg-parsechangelog))
44 dpkg-buildpackage -us -uc -rfakeroot -S
46 eval $(perl -ne 'print if s/^(Architecture): /\1=/' ${Source}_${Version}.dsc)
49 sbuild -d $distribution --arch-all ${Source}_${Version}.dsc;;
51 sbuild -d $distribution --arch amd64 --arch-all ${Source}_${Version}.dsc
52 sbuild -d $distribution --arch i386 ${Source}_${Version}.dsc;;
54 echo "invirt-build-release: arch '$Architecture' unimplemented" >&2
58 if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then
59 svn mkdir $svnuri/package_tags/$Source \
60 -m "Create package tags directory"
62 if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then
63 svn cp $svnuri/trunk/packages/$package $svnuri/package_tags/$Source/$Version \
64 -m "Tag $Version of $Source"
66 echo "$(basename $0): tag already exists, not making again"
69 [ $Distribution = 'unstable' ] \
70 || echo "$(basename $0): warning: Distribution is $Distribution, script expects unstable"
71 changesfile=`pwd`/${Source}_*${Version}*.changes
72 for i in $changesfile; do
73 reprepro-env include unstable $i
74 reprepro-env copy stable unstable $(sed -ne 's/^Binary: //p' $i)
76 reprepro-env copy stable unstable $Source
79 rm -rf build-release/$package