@@ -7,7 +7,7 @@ cd "../../sinequa_configs"
7
7
8
8
# Ensure the script only runs if pointing to the correct remote
9
9
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)
11
11
12
12
if [ " $CURRENT_URL " != " $REPO_URL " ]; then
13
13
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
43
43
44
44
echo " Operation completed successfully!"
45
45
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
+
46
71
# Return to the original directory
47
72
cd -
73
+
74
+ echo " webapp_automation and dev merges comleted successfully!"
0 commit comments