diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-07-20 11:20:53 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-08-16 10:53:58 +0200 |
commit | 72cc7705d965ac9262d8c5c5d36efb45c7d0a2ef (patch) | |
tree | 568919f53c52e9a36090d85da6754e5d3b900e17 | |
parent | 1de1b457449ac2be4872510a4d2668b00c3a45c0 (diff) |
In some cases it is useful to force rebuilding of the integration tree.
Add option for force-rebuilding the integ.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rwxr-xr-x | ci-merge | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -84,6 +84,9 @@ # We run in non-interactive mode by default INTERACTIVE=0 +# Do not force merging of the branches if there were no changes +FORCE=0 + # The default repository directory is the current one LOCAL_REPO=$PWD @@ -138,6 +141,7 @@ Help() { echo " -c|--cache <name> : URL to rerere cache repository [$RERERE_CACHE]" echo " -f|--config <name> : Config file listing branches to be merged [$CONFIG]" echo " -n|--interactive : Whether to run the tool interactively [$INTERACTIVE]" + echo " -y|--force : Whether to force merging the branches [$FORCE]" echo } @@ -148,8 +152,8 @@ Help() { # options_setup() { - SHORTOPT="hnl:r:b:i:t:c:f:" - LONGOPT="help,interactive,local:,remote:,baseline:,integ:,track:,cache:,config:" + SHORTOPT="hnl:r:b:i:t:c:f:y" + LONGOPT="help,interactive,local:,remote:,baseline:,integ:,track:,cache:,config:,force" OPTS=$(getopt -o $SHORTOPT -l $LONGOPT -- "$@") @@ -203,6 +207,10 @@ options_setup() { INTEG_BRANCH=$1 ;; + --force|-y) + FORCE=$1 + ;; + --cache|-c) RERERE_CACHE=$1 ;; @@ -580,7 +588,7 @@ do_update_baseline # If anything changed in the process (removal, addition, update) then # it makes sense to create a new integ branch, otherwise let the user # to choose to continue or abort the process -if [ $CHANGED -eq 0 ]; then +if [ $CHANGED -eq 0 -a $FORCE -ne 0 ]; then echo "No branches have changed since last time." echo -n "Abort building the integ branch? [Y/n]" read RES |