From b34f20cac80502ac6226954b4bca34dc86c8ee06 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 3 Jun 2012 23:17:59 +0200 Subject: [PATCH] =?UTF-8?q?Gestion=20du=20changelog=20en=20dehors=20du=20d?= =?UTF-8?q?=C3=A9p=C3=B4t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- submit | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/submit b/submit index d959bef..1780a03 100755 --- a/submit +++ b/submit @@ -10,21 +10,20 @@ if [ -z $DIST ]; then DIST="el5" fi -# Generate ChangeLog -git log --format=%H --grep="update changelog" > ignore_hash -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 +TMPDIR=$(mktemp -d) +mkdir -p $TMPDIR/$PACKAGE-$VERSION/ # 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 ssh -l $ME build.firewall-services.com mkdir -p rpmbuild/{RPMS,SRPMS,SPECS,SOURCES} # 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 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 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 - +rm -rf $TMPDIR