aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2023-07-20 11:20:53 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-08-16 10:53:58 +0200
commit72cc7705d965ac9262d8c5c5d36efb45c7d0a2ef (patch)
tree568919f53c52e9a36090d85da6754e5d3b900e17
parent1de1b457449ac2be4872510a4d2668b00c3a45c0 (diff)
ci-merge: allow forcing rebuild of the integration treeHEADmaster
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-xci-merge14
1 files changed, 11 insertions, 3 deletions
diff --git a/ci-merge b/ci-merge
index d59821f..cdcceb0 100755
--- a/ci-merge
+++ b/ci-merge
@@ -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