From 5bffe8f68fe041e96820d61ebf51291052628fc7 Mon Sep 17 00:00:00 2001 From: "markus.block" Date: Sun, 22 Feb 2026 19:24:28 +0100 Subject: [PATCH] release-process (#7) Reviewed-on: https://gitea.netzwissen.de/lxcafe/lxcafe/pulls/7 --- release.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index 922612c..2e33b62 100755 --- a/release.sh +++ b/release.sh @@ -11,6 +11,13 @@ if [ -n "$(git status --porcelain)" ]; then exit 1 fi +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [ "$CURRENT_BRANCH" != "main" ]; then + echo "Error: You must be on the main branch to release." + echo "Current branch: $CURRENT_BRANCH" + exit 1 +fi + VERSION_FILE="VERSION" SCRIPT_FILE="post_installation_script/Nachinstallationsarbeiten_LC_Esslingen_XFCE.sh" @@ -78,8 +85,8 @@ echo "Tag $NEXT_VERSION_STR created locally." read -p "Push to origin (includes tags)? [y/N]: " push_confirm if [[ "$push_confirm" == "y" || "$push_confirm" == "Y" ]]; then - git push origin --tags + git push origin main --tags echo "Done! Gitea will create release from tag $NEXT_VERSION_STR" else - echo "Release prepared locally. Push manually with: git push origin --tags" + echo "Release prepared locally. Push manually with: git push origin main --tags" fi