Skip to content

Commit ba9992e

Browse files
committed
add merge of webapp into dev
1 parent 0efdd02 commit ba9992e

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

scripts/quality_and_indexing/pull_and_merge_webapp_automation.sh

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cd "../../sinequa_configs"
77

88
# Ensure the script only runs if pointing to the correct remote
99
REPO_URL="[email protected]:NASA-IMPACT/sde-backend.git"
10-
CURRENT_URL=$(git -C "$REPO_DIR" config --get remote.origin.url)
10+
CURRENT_URL=$(git config --get remote.origin.url)
1111

1212
if [ "$CURRENT_URL" != "$REPO_URL" ]; then
1313
echo "Error: This script can only be run in the repository with the remote URL '$REPO_URL'."
@@ -43,5 +43,32 @@ git push origin webapp_config_generation
4343

4444
echo "Operation completed successfully!"
4545

46+
### Begin merge of webapp into dev ###
47+
# Check the diff between webapp_config_generation and dev branches, and filter only files outside the allowed directories
48+
DIFF=$(git diff --name-only webapp_config_generation dev | grep -vE 'jobs/|sources/' || true)
49+
50+
if [ -n "$DIFF" ]; then
51+
echo "The following changes were found outside of the allowed directories:"
52+
echo "$DIFF"
53+
echo "Please resolve these changes on GitHub before proceeding."
54+
exit 1
55+
else
56+
echo "All changes are within the allowed directories. Proceeding with the merge."
57+
fi
58+
59+
# Checkout dev branch again
60+
echo "Checking out dev branch..."
61+
git checkout dev
62+
63+
# Merge webapp_config_generation into dev
64+
echo "Merging webapp_config_generation into dev..."
65+
git merge webapp_config_generation -m "Merge webapp_config_generation into dev branch"
66+
67+
# Push the changes to dev
68+
echo "Pushing changes to dev..."
69+
git push origin dev
70+
4671
# Return to the original directory
4772
cd -
73+
74+
echo "webapp_automation and dev merges comleted successfully!"

0 commit comments

Comments
 (0)