diff options
author | Sarah German <sgerman@gitlab.com> | 2023-01-11 19:57:22 +0300 |
---|---|---|
committer | Sarah German <sgerman@gitlab.com> | 2023-01-11 19:57:22 +0300 |
commit | 314ad5776df6976d469350160daa6f42d187c942 (patch) | |
tree | e35349c08ca489fb61c810ed53a60b1eef8cd994 /lib | |
parent | a6768b5654996357ef409559b02c5bff8a0fc6a9 (diff) |
Revert "Merge branch 'axil-target-branch-upstream' into 'main'"
This reverts merge request !3430
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/task_helpers.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/tasks/task_helpers.rb b/lib/tasks/task_helpers.rb index ab9f19e0..bf5e54ac 100644 --- a/lib/tasks/task_helpers.rb +++ b/lib/tasks/task_helpers.rb @@ -32,10 +32,9 @@ class TaskHelpers if ENV["CI_COMMIT_REF_NAME"].nil? default_branch(products[slug].fetch('repo')) - # If we're on a gitlab-docs stable branch (or targeting one) according to the - # regex, catch the version and assign the product stable branches - # correctly. - elsif version = ENV["CI_COMMIT_REF_NAME"].match(VERSION_FORMAT) || ENV["CI_MERGE_REQUEST_TARGET_BRANCH_NAME"].match(VERSION_FORMAT) + # If we're on a gitlab-docs stable branch according to the regex, catch the + # version and assign the product stable branches correctly. + elsif version = ENV["CI_COMMIT_REF_NAME"].match(VERSION_FORMAT) case slug # EE has different branch name scheme @@ -47,10 +46,8 @@ class TaskHelpers # Charts don't use the same version scheme as GitLab, we need to # deduct their version from the GitLab equivalent one. - # Take the values defined in 'version', and use '.match' to split them - # to :major and :minor so that we can use them to craft the charts version. when 'charts' - chart = chart_version("#{version[:major]}.#{version[:minor]}").match(VERSION_FORMAT) + chart = chart_version(ENV.fetch('CI_COMMIT_REF_NAME', nil)).match(VERSION_FORMAT) "#{chart[:major]}-#{chart[:minor]}-stable" # If the upstream product doesn't follow a stable branch scheme, set the |