Skip to content

Commit 5cb2b8c

Browse files
authored
Use latest upstream instead of local branch for tags (#153)
This is to avoid accidentally tagging the wrong commit if the wrong branch is checked out. Signed-off-by: Reinhard Nägele <[email protected]>
1 parent e2e0c8c commit 5cb2b8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tag.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ main() {
9797

9898
pushd "$SCRIPT_DIR" > /dev/null
9999

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

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

0 commit comments

Comments
 (0)