prefix archive to packagename-version

master
Daniel Berteaud 13 years ago
parent 482c0f775e
commit 63728cc473
  1. 2
      buildsrpm

@ -6,7 +6,7 @@ VERSION=$(rpm -q --qf "%{version}" --specfile $PACKAGE.spec)
if [ \! -e ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz ]; then if [ \! -e ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz ]; then
BRANCH=$(git branch | grep '*' | cut -d' ' -f2) BRANCH=$(git branch | grep '*' | cut -d' ' -f2)
git tag $VERSION git tag $VERSION
git archive --format=tar.gz -o ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz $BRANCH git archive --format=tar.gz --prefix=$PACKAGE-$VERSION/ -o ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz $BRANCH
fi fi
rpmbuild -bs $PACKAGE.spec rpmbuild -bs $PACKAGE.spec
rm -f ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz rm -f ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz

Loading…
Cancel
Save