Skip to content

Commit 05524ea

Browse files
jvdmCopilot
andauthored
Update scripts/patch-release.sh
Co-authored-by: Copilot <[email protected]>
1 parent e9b7059 commit 05524ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/patch-release.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,16 @@ main() {
282282

283283
local version="${release}.${patch_number}"
284284
local previous_tag="${latest_tag:-}"
285+
286+
# Check if the tag already exists
287+
if git rev-parse "refs/tags/$version" >/dev/null 2>&1; then
288+
if [[ "$DRY_RUN" == "true" ]]; then
289+
log_warn "Tag '$version' already exists (dry-run mode, continuing)."
290+
else
291+
log_error "Tag '$version' already exists. Aborting release."
292+
exit 1
293+
fi
294+
fi
285295
echo
286296

287297
# Step 3: Verify branch state.

0 commit comments

Comments
 (0)