From b59022dd2c8ce820028c8da96d6639a534ad58fc Mon Sep 17 00:00:00 2001 From: rubenruizdegauna Date: Mon, 15 Jul 2024 15:42:04 +0200 Subject: [PATCH] script to recreate v1 tag pointing to latest tag (#25) --- scripts/recreate-tag.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/recreate-tag.sh diff --git a/scripts/recreate-tag.sh b/scripts/recreate-tag.sh new file mode 100755 index 0000000..5981069 --- /dev/null +++ b/scripts/recreate-tag.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# This script recreates tag v1 in the repository +# It will: +# 1. Fetch all tags and prune them +# 2. Checkout the main branch +# 3. Delete the tag v1 +# 4. Push the deletion of the tag v1 +# 5. Create the tag v1 + + +TAG_NAME="v1" + +git fetch --tags --prune-tags -f +git checkout origin/main +git tag -d $TAG_NAME +git push --delete origin $TAG_NAME +git tag $TAG_NAME +git push origin $TAG_NAME