Skip to content

Commit

Permalink
Use latest upstream instead of local branch for tags (helm#153)
Browse files Browse the repository at this point in the history
This is to avoid accidentally tagging the wrong commit if
the wrong branch is checked out.

Signed-off-by: Reinhard Nägele <[email protected]>
  • Loading branch information
unguiculus authored Apr 25, 2019
1 parent e2e0c8c commit 5cb2b8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"
Expand Down

0 comments on commit 5cb2b8c

Please sign in to comment.