diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-08-15 07:27:59 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2018-08-15 07:27:59 +0000 |
commit | 2e8fe26b9bfedf7d65270c9874fcdcb62d58e741 (patch) | |
tree | a49f2e6533a2c277ec7a448bdd9ea58570405cad /bin/secpick | |
parent | 958ea287b5a2abe8a5ddaf9c6e01bea2d5de6590 (diff) | |
download | gitlab-ce-2e8fe26b9bfedf7d65270c9874fcdcb62d58e741.tar.gz |
Fix `bin/secpick` rainbow gem error, and security branch prefixing
Diffstat (limited to 'bin/secpick')
-rwxr-xr-x | bin/secpick | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/secpick b/bin/secpick index 5029fe57cfe..5e30c8e72c5 100755 --- a/bin/secpick +++ b/bin/secpick @@ -35,7 +35,9 @@ parser.parse! abort("Missing options. Use #{$0} --help to see the list of options available".red) if options.values.include?(nil) abort("Wrong version format #{options[:version].bold}".red) unless options[:version] =~ /\A\d*\-\d*\Z/ -branch = [BRANCH_PREFIX, options[:branch], options[:version]].join('-').freeze +branch = "#{options[:branch]}-#{options[:version]}" +branch.prepend("#{BRANCH_PREFIX}-") unless branch.start_with?("#{BRANCH_PREFIX}-") +branch = branch.freeze stable_branch = "#{BRANCH_PREFIX}-#{options[:version]}".freeze 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}" |