From 8923e7f7a4bc74d4109443220d98539dbc9d0032 Mon Sep 17 00:00:00 2001 From: VitoAlbano Date: Mon, 19 Aug 2024 22:23:44 +0100 Subject: [PATCH] [ci:force] - Script update permissions --- scripts/migration/export-commits.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/migration/export-commits.sh diff --git a/scripts/migration/export-commits.sh b/scripts/migration/export-commits.sh new file mode 100644 index 0000000000..5e098ce77a --- /dev/null +++ b/scripts/migration/export-commits.sh @@ -0,0 +1,29 @@ +git fetch + +git checkout develop +git pull --rebase +git checkout ng16-develop +git rebase origin/develop +git push origin ng16-develop --force --no-verify +echo -e "\e[34m===> Rebase complete \e[0m" + +if [ $? -eq 0 ]; then + echo -e "\e[34m===> Resetting Migration Branch \e[0m" + git checkout ng16-migration + git reset --hard origin/develop + + git cherry-pick --quit + echo -e "\e[34m===> Merge changes from cherry pick branch: ng16-develop cherry pick list\e[0m" + git cherry-pick `git log --pretty=format:"%H" origin/develop..origin/ng16-develop --reverse` -x + if [ $? -eq 0 ]; then + echo -e "\e[34m===> Cherry Picking complete! Pushing... \e[0m" + # git push origin ng16-migration --force --no-verify + echo -e "\e[34m===> Pushed \e[0m" + else + echo -e "\e[31mThere was some error during cherry-picking of ng16-develop\e[0m" + exit 1; + fi +else + echo -e "\e[31mThere was some error during rebasing/resetting!\e[0m" + exit 1; +fi