summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2018-05-14 08:37:50 +0000
committerJames Lopez <james@gitlab.com>2018-05-14 08:37:50 +0000
commit682cd964e13e22eb2ae38da6bec872ef14c31fa5 (patch)
tree9cb5450f11e3f436840c7c9bd2098430bd07cbbe
parent902078477e0f1cda33609f4b3bb08eebd4925fe4 (diff)
parent02e7962ad410762b9b3ab5172f442ef35e91b1c1 (diff)
downloadgitlab-ce-682cd964e13e22eb2ae38da6bec872ef14c31fa5.tar.gz
Merge branch 'fix/secpick-script' into 'master'
Update secpick to use security branches See merge request gitlab-org/gitlab-ce!18937
-rwxr-xr-xbin/secpick5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/secpick b/bin/secpick
index 76ae231e913..5029fe57cfe 100755
--- a/bin/secpick
+++ b/bin/secpick
@@ -5,7 +5,6 @@ require 'rainbow/refinement'
using Rainbow
BRANCH_PREFIX = 'security'.freeze
-STABLE_BRANCH_SUFFIX = 'stable'.freeze
REMOTE = 'dev'.freeze
options = { version: nil, branch: nil, sha: nil }
@@ -37,9 +36,9 @@ abort("Missing options. Use #{$0} --help to see the list of options available".r
abort("Wrong version format #{options[:version].bold}".red) unless options[:version] =~ /\A\d*\-\d*\Z/
branch = [BRANCH_PREFIX, options[:branch], options[:version]].join('-').freeze
-stable_branch = "#{options[:version]}-#{STABLE_BRANCH_SUFFIX}".freeze
+stable_branch = "#{BRANCH_PREFIX}-#{options[:version]}".freeze
-command = "git checkout #{stable_branch} && git pull #{REMOTE} #{stable_branch} && git checkout -B #{branch} && git cherry-pick #{options[:sha]} && git push #{REMOTE} #{branch}"
+command = "git fetch #{REMOTE} #{stable_branch} && git checkout #{stable_branch} && git pull #{REMOTE} #{stable_branch} && git checkout -B #{branch} && git cherry-pick #{options[:sha]} && git push #{REMOTE} #{branch}"
_stdin, stdout, stderr = Open3.popen3(command)