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