File tree Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,17 @@ promote code:
371371 - git push
372372 dependencies : []
373373
374+ update agpl main dryrun :
375+ extends : .update agpl main
376+ stage : .post
377+ rules :
378+ - if : $CI_DESCRIPTION =~ /Nightly/
379+ when : always
380+ allow_failure : true
381+ variables :
382+ MODE : " dryrun"
383+ needs : []
384+
374385# ###############################################################################
375386# Enable / Disable pipelines
376387# ###############################################################################
Original file line number Diff line number Diff line change @@ -15,15 +15,13 @@ stages:
1515 - private
1616 - public
1717
18- update agpl main :
18+ . update agpl main :
1919 stage : private
20- rules :
21- - if : $ON_TAG
22- allow_failure : true
2320 interruptible : false
2421 variables :
2522 GIT_STRATEGY : none
2623 BRANCH : agpl_main
24+ MODE : " "
2725 image : ubuntu:22.04
2826 before_script :
2927 - DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends git git-lfs apt-transport-https ca-certificates
@@ -33,7 +31,14 @@ update agpl main:
3331 - git clone https://${CODEBOT_USERNAME}:${CODEBOT_TOKEN}@gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git /${CI_PROJECT_NAME}
3432 - cd /${CI_PROJECT_NAME}
3533 - git fetch -q origin ${CI_COMMIT_SHA} && git checkout ${CI_COMMIT_SHA}
36- - .gitlab/ci/release/auto_merge.sh ${CI_COMMIT_SHA} ${BRANCH}
34+ - .gitlab/ci/release/auto_merge.sh ${CI_COMMIT_SHA} ${BRANCH} ${MODE}
35+
36+ update agpl main :
37+ extends : .update agpl main
38+ rules :
39+ - if : $ON_TAG
40+ variables :
41+ MODE : " push"
3742
3843generate testvector tar gz :
3944 stage : private
Original file line number Diff line number Diff line change @@ -115,14 +115,15 @@ update_headers() {
115115
116116main () {
117117 # Check number of args
118- if (( $# != 2 )) ; then
118+ if [ $# != 2 ] && [ $# != 3 ] ; then
119119 echo >&2 " Please call script with source branch and target branch as argument"
120- echo >&2 " E.g. ./auto_merge.sh <source_branch> <target_branch>"
120+ echo >&2 " E.g. ./auto_merge.sh <source_branch> <target_branch> [dryrun] "
121121 exit 1
122122 fi
123123
124124 local source_branch=$1
125125 local target_branch=$2
126+ local mode=" ${3:- push} "
126127
127128 # Checkout target branch
128129 git fetch -q origin " $target_branch "
@@ -151,7 +152,9 @@ main() {
151152 git commit -a -m " Adding AGPL copyright to new files"
152153
153154 # Push
154- git push origin " $target_branch "
155+ if [ " $mode " = " push" ]; then
156+ git push origin " $target_branch "
157+ fi
155158}
156159
157160main " $@ "
You can’t perform that action at this time.
0 commit comments