From 68bbd9023c8498f59825b1ddf171126eb863d995 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 1 Apr 2013 19:48:24 +0200 Subject: [PATCH] Specify release number and allow subpackages --- submit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/submit b/submit index 750107f..838d99b 100755 --- a/submit +++ b/submit @@ -1,7 +1,8 @@ #!/bin/bash PACKAGE=$(basename $(pwd)) -VERSION=$(rpm -q --qf "%{version}" --specfile $PACKAGE.spec) +VERSION=$(rpm -q --qf "%{version}\n" --specfile $PACKAGE.spec | head -1) +RELEASE=$(rpm -q --qf "%{release}\n" --specfile $PACKAGE.spec | head -1) ME=$(whoami) SERVER=build.firewall-services.com BRANCH=$(git branch | grep '*' | cut -d' ' -f2) @@ -37,7 +38,7 @@ scp -o ControlPath=$SOCKET $PACKAGE.spec $ME@$SERVER:rpmbuild/SPECS/ # And build ssh -o ControlPath=$SOCKET -l $ME $SERVER rpmbuild -bs --nodeps rpmbuild/SPECS/$PACKAGE.spec -ssh -o ControlPath=$SOCKET -l $ME $SERVER buildrpm rpmbuild/SRPMS/$PACKAGE-$VERSION-*.src.rpm $DIST +ssh -o ControlPath=$SOCKET -l $ME $SERVER buildrpm rpmbuild/SRPMS/$PACKAGE-$VERSION-$RELEASE.src.rpm $DIST ssh -o ControlPath=$SOCKET -l $ME $SERVER rm -f rpmbuild/SPECS/$PACKAGE.spec rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz rpmbuild/SRPMS/$PACKAGE-$VERSION*.src.rpm rm -rf $TMPDIR