fix for version release
This commit is contained in:
parent
5c4f74da8f
commit
9916c56721
14
git-retag.sh
14
git-retag.sh
@ -144,13 +144,17 @@ for tag in $OLDTAGS ; do
|
||||
-H "Authorization: token $GITEAACCESSTOKEN" )
|
||||
done
|
||||
# Now create the version and release tag from the specfile
|
||||
VERSION_RELEASE=`rpm --queryformat '%{version} %{release}\n' --specfile $REPO_NAME.spec`
|
||||
VERSION_RELEASE_LONG=`rpm --queryformat '%{version} %{release}\n' --specfile $REPO_NAME.spec`
|
||||
VERSION_RELEASE=${VERSION_RELEASE_LONG%%$'\n'*}
|
||||
VERSION=${VERSION_RELEASE% *}
|
||||
REST=${VERSION_RELEASE#* }
|
||||
RELEASE=${REST#* }
|
||||
# Release is not reliable - if you run on Rocky it comes back EL8, centos 7 - EL7
|
||||
# So, we need to just take the build part (first word)
|
||||
RELEASE=${VERSION_RELEASE#* }
|
||||
TAG=$VERSION"-"${RELEASE%.*}
|
||||
if [ $DEBUG ] ; then
|
||||
echo "VERSION_RELEASE=$VERSION_RELEASE"
|
||||
echo "VERSION=$VERSION"
|
||||
echo "RELEASE=$RELEASE"
|
||||
echo "TAG=$TAG"
|
||||
fi
|
||||
git pull
|
||||
git tag -a $TAG -m "Setting tag to current Version-Release in spec file: $TAG"
|
||||
git push origin --tag $TAG $QUIET
|
||||
|
Loading…
Reference in New Issue
Block a user