Skip to content

Commit 1817c80

Browse files
authored
Added git fetch/commit logic to script (#327)
* Added git fetch/commit logic to script Signed-off-by: Satyajit Bulage <[email protected]> * Removed empty line --------- Signed-off-by: Satyajit Bulage <[email protected]>
1 parent a5415c4 commit 1817c80

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/assets/disable_polling_reset_2_replicas.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ git config user.email "[email protected]"
2626
git config user.name "fleetqa"
2727
git add nginx.yaml
2828

29+
git fetch origin
30+
2931
if ! git diff --quiet origin/main;
3032
then
3133
echo "Changes detected from original repo. Changing replicas to 2"
32-
git commit -m 'Ensuring initial number of replicas is 2'
33-
git push -u origin main
34+
git commit -m 'Ensuring initial number of replicas is 2' && \
35+
git push -u origin main || \
36+
echo "Nothing to commit"
3437
else
3538
echo -e "Nothing to push, done"
36-
fi
39+
fi

0 commit comments

Comments
 (0)