From e6b6a649e7585ca755ca796d8386d801ede72442 Mon Sep 17 00:00:00 2001 From: Ruben Ruiz de Gauna Date: Fri, 12 Jul 2024 11:20:02 +0200 Subject: [PATCH] script to recreate v1 tag pointing to latest tag --- 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