Skip to content
Permalink
Browse files

Use latest upstream instead of local branch for tags (#32)

This is to avoid accidentally tagging the wrong commit if
the wrong branch is checked out.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
  • Loading branch information...
unguiculus committed Apr 30, 2019
1 parent ad61bb2 commit 7f5a0ec6c99008aa30f92304694e1f1410cca21e
Showing with 2 additions and 1 deletion.
  1. +2 −1 tag.sh
3 tag.sh
@@ -97,7 +97,8 @@ main() {

pushd "$SCRIPT_DIR" > /dev/null

git tag -a -m "Release $tag" "$tag" "${force[@]}"
git fetch "$remote"
git tag -a -m "Release $tag" "$tag" "$remote/master" "${force[@]}"

if [[ -z "$skip_push" ]]; then
git push "$remote" "refs/tags/$tag" "${force[@]}"

0 comments on commit 7f5a0ec

Please sign in to comment.
You can’t perform that action at this time.