Legacy build scripts, not maintained nor used anymore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
830 B

#!/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