From ca010e4a51f16088faa8b52f8f8246c51c605e8b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 24 Apr 2023 14:41:20 +0200 Subject: [PATCH] sdk_bootstrap: Push a branch also for two-phase SDK nightly builds The two-phase nightly builds create an intermediate tag first, which didn't match the main nightly tag regexp before. Because of that, the commit was not pushed to the main branch. The following final SDK build had a version that matched the regexp, but the last commit (with the intermediate tag on it) wasn't in main, and thus was also not pushed. --- ci-automation/sdk_bootstrap.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci-automation/sdk_bootstrap.sh b/ci-automation/sdk_bootstrap.sh index bb18f94eb9..a270747c04 100644 --- a/ci-automation/sdk_bootstrap.sh +++ b/ci-automation/sdk_bootstrap.sh @@ -76,9 +76,10 @@ function _sdk_bootstrap_impl() { # Create new tag in scripts repo w/ updated versionfile. # Also push the changes to the branch ONLY IF we're doing a nightly - # build of the 'main' branch AND we're definitely ON the main branch + # build of the 'main' branch AND we're definitely ON the main branch. + # This includes intermediate SDKs when doing 2-phase nightly builds. local push_branch="false" - if [[ "${version}" =~ ^main-[0-9.]+-nightly-[-0-9]+$ ]] \ + if [[ "${version}" =~ ^main-[0-9.]+-nightly-[-0-9]+(-INTERMEDIATE)?$ ]] \ && [ "$(git rev-parse --abbrev-ref HEAD)" = "main" ] ; then push_branch="true" local existing_tag=""