Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2023-01-11 21:01:20 +0300
committerSarah German <sgerman@gitlab.com>2023-01-11 21:01:20 +0300
commit8cb467fe27e4cc87180ede8a4d58f5a2c1954c94 (patch)
treee35349c08ca489fb61c810ed53a60b1eef8cd994
parenta6768b5654996357ef409559b02c5bff8a0fc6a9 (diff)
parent314ad5776df6976d469350160daa6f42d187c942 (diff)
Merge branch 'revert-a6768b56' into 'main'
Revert "Merge branch 'axil-target-branch-upstream' into 'main'" See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3431 Merged-by: Sarah German <sgerman@gitlab.com>
-rw-r--r--lib/tasks/task_helpers.rb11
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