From e8f5a546e05adef4dc8705743e70065d1ab36e6c Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 17 Mar 2012 17:39:21 +0100 Subject: [PATCH] submit script --- submit | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 submit diff --git a/submit b/submit new file mode 100755 index 0000000..19dfa8c --- /dev/null +++ b/submit @@ -0,0 +1,15 @@ +#!/bin/bash + +PACKAGE=$(basename $(pwd)) +VERSION=$(rpm -q --qf "%{version}" --specfile $PACKAGE.spec) +ME=$(whoami) +BRANCH=$(git branch | grep '*' | cut -d' ' -f2) + +git tag $VERSION +ssh -l $ME build.firewall-services.com mkdir -p rpmbuild/{RPMS,SRPMS,SPECS,SOURCES} +git archive --format=tar.gz --prefix=$PACKAGE-$VERSION/ $BRANCH | ssh -l $ME build.firewall-services.com "cat > rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz" +scp $PACKAGE.spec $ME@build.firewall-services.com:rpmbuild/SPECS/ +ssh -l $ME build.firewall-services.com rpmbuild -bs --nodeps rpmbuild/SPECS/$PACKAGE.spec +ssh -l $ME build.firewall-services.com buildrpm rpmbuild/SRPMS/$PACKAGE-$VERSION-*.src.rpm sme8 +ssh -l $ME build.firewall-services.com rm -f rpmbuild/SPECS/$PACKAGE.spec rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz rpmbuild/SRPMS/$PACKAGE-$VERSION*.src.rpm +