commit
482c0f775e
1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
||||
#!/bin/bash |
||||
|
||||
PACKAGE=$(basename $(pwd)) |
||||
VERSION=$(rpm -q --qf "%{version}" --specfile $PACKAGE.spec) |
||||
|
||||
if [ \! -e ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz ]; then |
||||
BRANCH=$(git branch | grep '*' | cut -d' ' -f2) |
||||
git tag $VERSION |
||||
git archive --format=tar.gz -o ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz $BRANCH |
||||
fi |
||||
rpmbuild -bs $PACKAGE.spec |
||||
rm -f ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz |
||||
|
Loading…
Reference in new issue