Script zum Taggen der Übungen einer Schulung scripting
authorKai Moritz <kai@juplo.de>
Sun, 17 Nov 2024 12:15:16 +0000 (13:15 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 17 Nov 2024 12:15:16 +0000 (13:15 +0100)
TAG.sh [new file with mode: 0755]

diff --git a/TAG.sh b/TAG.sh
new file mode 100755 (executable)
index 0000000..491435d
--- /dev/null
+++ b/TAG.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e
+
+source BRANCHES.sh
+
+if [ "$1" == "" ]
+then
+  echo "Prefix for tag is missing"
+  exit 1;
+fi
+
+for i in $BRANCHES;
+do
+  declare -n branch=${i}
+  echo -e "\nTagging $branch with ${branch}--$1\n"
+  git tag -f ${branch}--$1 $branch
+  git push --force origin ${branch}--$1
+done