|
|
@ -10,21 +10,20 @@ if [ -z $DIST ]; then |
|
|
|
DIST="el5" |
|
|
|
DIST="el5" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Generate ChangeLog |
|
|
|
TMPDIR=$(mktemp -d) |
|
|
|
git log --format=%H --grep="update changelog" > ignore_hash |
|
|
|
mkdir -p $TMPDIR/$PACKAGE-$VERSION/ |
|
|
|
git log --format=%H | grep -v -f ignore_hash | git log --pretty --stdin --no-walk > CHANGELOG.git |
|
|
|
|
|
|
|
rm -f ignore_hash |
|
|
|
|
|
|
|
git add CHANGELOG.git |
|
|
|
|
|
|
|
git commit -m 'update changelog' CHANGELOG.git |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Tag GIT using the version in the spec file |
|
|
|
# Tag GIT using the version in the spec file |
|
|
|
git tag $VERSION |
|
|
|
git tag $VERSION 2>&1 > /dev/null |
|
|
|
|
|
|
|
|
|
|
|
# Create needed dirs on the build box |
|
|
|
# Create needed dirs on the build box |
|
|
|
ssh -l $ME build.firewall-services.com mkdir -p rpmbuild/{RPMS,SRPMS,SPECS,SOURCES} |
|
|
|
ssh -l $ME build.firewall-services.com mkdir -p rpmbuild/{RPMS,SRPMS,SPECS,SOURCES} |
|
|
|
|
|
|
|
|
|
|
|
# Generate a tgz archive from the repo |
|
|
|
# Generate a tgz archive from the repo |
|
|
|
git archive --format=tar.gz --prefix=$PACKAGE-$VERSION/ $BRANCH | ssh -l $ME build.firewall-services.com "cat > rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz" |
|
|
|
git archive --format=tar --prefix=$PACKAGE-$VERSION/ $BRANCH | tar xf - -C $TMPDIR |
|
|
|
|
|
|
|
# Generate ChangeLog |
|
|
|
|
|
|
|
git log --format=%H | git log --pretty --stdin --no-walk > $TMPDIR/$PACKAGE-$VERSION/CHANGELOG.git |
|
|
|
|
|
|
|
tar cz -C $TMPDIR $PACKAGE-$VERSION | ssh -l $ME build.firewall-services.com "cat > rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz" |
|
|
|
|
|
|
|
|
|
|
|
# Upload the spec file |
|
|
|
# Upload the spec file |
|
|
|
scp $PACKAGE.spec $ME@build.firewall-services.com:rpmbuild/SPECS/ |
|
|
|
scp $PACKAGE.spec $ME@build.firewall-services.com:rpmbuild/SPECS/ |
|
|
@ -33,4 +32,4 @@ 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 rpmbuild -bs --nodeps rpmbuild/SPECS/$PACKAGE.spec |
|
|
|
ssh -l $ME build.firewall-services.com buildrpm rpmbuild/SRPMS/$PACKAGE-$VERSION-*.src.rpm $DIST |
|
|
|
ssh -l $ME build.firewall-services.com buildrpm rpmbuild/SRPMS/$PACKAGE-$VERSION-*.src.rpm $DIST |
|
|
|
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 |
|
|
|
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 |
|
|
|
|
|
|
|
rm -rf $TMPDIR |
|
|
|