Skip to content

Commit d9308d1

Browse files
committed
tag current branch not master
1 parent 3a56a62 commit d9308d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

infinispan-cpp-client-tag.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ if [ "$#" == "1" ]; then
1010
echo CPACK_PACKAGE_VERSION_MINOR=$MIN
1111
echo CPACK_PACKAGE_VERSION_PATCH=$PAT
1212
if [ -n "$MAJ" ] && [ -n "$MIN" ] && [ -n "$PAT" ] && [ -z "$EXTRA" ]; then
13-
git checkout -b __tmp origin/master
13+
CURR_BRANCH=$(git branch --show-current)
14+
git checkout -b __tmp
1415
sed -i -e 's/set (CPACK_PACKAGE_VERSION_MAJOR *".*")/set (CPACK_PACKAGE_VERSION_MAJOR "'"$MAJ"'")/' \
1516
-e 's/set (CPACK_PACKAGE_VERSION_MINOR *".*")/set (CPACK_PACKAGE_VERSION_MINOR "'"$MIN"'")/' \
1617
-e 's/set (CPACK_PACKAGE_VERSION_PATCH *".*")/set (CPACK_PACKAGE_VERSION_PATCH "'"$PAT"'")/' CMakeLists.txt
@@ -20,7 +21,7 @@ if [ "$#" == "1" ]; then
2021
git commit -m "$MAJ.$MIN.$PAT"
2122
git tag -a "$MAJ.$MIN.$PAT" -m "$MAJ.$MIN.$PAT"
2223
git push origin "$MAJ.$MIN.$PAT"
23-
git checkout master
24+
git checkout $CURR_BRANCH
2425
git branch -D __tmp
2526
exit 0
2627
fi

0 commit comments

Comments
 (0)