Skip to content

Commit 0efdd02

Browse files
committed
add checks for repo remote and auto merge message to automation.sh
1 parent 106c36a commit 0efdd02

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

scripts/quality_and_indexing/pull_and_merge_webapp_automation.sh

100644100755
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
set -e
44

5+
# Navigate to the correct repository
6+
cd "../../sinequa_configs"
7+
8+
# Ensure the script only runs if pointing to the correct remote
9+
REPO_URL="[email protected]:NASA-IMPACT/sde-backend.git"
10+
CURRENT_URL=$(git -C "$REPO_DIR" config --get remote.origin.url)
11+
12+
if [ "$CURRENT_URL" != "$REPO_URL" ]; then
13+
echo "Error: This script can only be run in the repository with the remote URL '$REPO_URL'."
14+
echo "Current remote URL is '$CURRENT_URL'. Exiting."
15+
exit 1
16+
fi
17+
518
# Checkout and pull master
619
echo "Checking out master branch..."
720
git checkout master
@@ -22,10 +35,13 @@ git pull origin webapp_config_generation
2235

2336
# Merge dev into webapp_config_generation
2437
echo "Merging dev into webapp_config_generation..."
25-
git merge -X theirs dev
38+
git merge -X theirs dev -m "Merge dev into webapp_config_generation branch - auto-resolved conflicts by taking dev changes"
2639

2740
# Push the changes to webapp_config_generation
2841
echo "Pushing changes to webapp_config_generation..."
2942
git push origin webapp_config_generation
3043

3144
echo "Operation completed successfully!"
45+
46+
# Return to the original directory
47+
cd -

0 commit comments

Comments
 (0)