From 172c5f2c13ed01a7a09aff238f3ac17f44ebd604 Mon Sep 17 00:00:00 2001
From: "p.delpy@dkfz-heidelberg.de"
Date: Fri, 21 Feb 2025 08:21:50 +0100
Subject: [PATCH] fix: git checkout main
---
lib/update-bridgehead.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/update-bridgehead.sh b/lib/update-bridgehead.sh
index 56afb17..5419f23 100755
--- a/lib/update-bridgehead.sh
+++ b/lib/update-bridgehead.sh
@@ -81,6 +81,12 @@ for DIR in /etc/bridgehead $(pwd); do
log "INFO" "You can review all changes on the repository with $git_repository_url/compare?from=$old_git_hash&to=$new_git_hash"
fi
git_updated="true"
+ if [ "$DIR" == "/srv/docker/bridgehead" ]; then
+ git -C "$DIR" checkout main
+ REPORT_BRANCH_NAME=$(git -C "$DIR" branch --show-current)
+ REPORT_STATUS_CHECK=$(git -C "$DIR" status --porcelain)
+ report_error 7 "MAINTENANCE: Switched Branch to main, you are now on branch $REPORT_BRANCH_NAME \n see status \n $REPORT_STATUS_CHECK"
+ fi
fi
done