From 11e25b3b85132a8e2c9ca8e5e1cf8c0c5a3b8c6a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 5 Aug 2024 10:13:08 -0600 Subject: [PATCH] Add script for tagging --- scripts/tag.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/tag.sh diff --git a/scripts/tag.sh b/scripts/tag.sh new file mode 100755 index 0000000..157872c --- /dev/null +++ b/scripts/tag.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -e + +TAG="$1" + +if [ -z "$TAG" ] +then + echo "$0 [tag]" >&2 + exit 1 +fi + +echo "Do you want to tag the current state of cosmic-epoch with the tag $TAG? (y/N)" +read answer +if [ "$answer" != "y" ] +then + echo "Did not answer y, exiting" >&2 + exit 1 +fi + +set -x + +git fetch --recurse-submodules + +git tag --force "$TAG" +git submodule foreach git tag --force "$TAG" + +git push --force origin tag "$TAG" +git submodule foreach git push --force origin tag "$TAG"