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.
14 lines
400 B
14 lines
400 B
13 years ago
|
#!/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
|
||
|
|