diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-09-04 12:11:10 +0300 |
---|---|---|
committer | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-09-04 12:11:10 +0300 |
commit | c9f1938847d7989973c05b29d6ba5ddbf3c4a5a8 (patch) | |
tree | c582408df30b1dcc8c018e2f0d919ee19afca729 /_support | |
parent | 9009267522d8e13ee1b3e9c394e6f9900ea0e331 (diff) |
Push to origin, not a hard-coded remote, in release script
Diffstat (limited to '_support')
-rwxr-xr-x | _support/release | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/_support/release b/_support/release index d1d48d350..78e19ab05 100755 --- a/_support/release +++ b/_support/release @@ -3,7 +3,23 @@ require 'erb' require_relative 'run.rb' +REMOTE_REGEX = %r{gitlab.com.gitlab-org/gitaly.git} + +# Sanity check +%w[ + git@gitlab.com:gitlab-org/gitaly.git + https://gitlab.com/gitlab-org/gitaly.git + https://janedoe@gitlab.com/gitlab-org/gitaly.git +].each do |remote| + abort "regex check failed failed for #{remote.inspect}" unless REMOTE_REGEX.match(remote) +end + def main(version) + remote = capture!(%w[git remote get-url --push origin]) + unless REMOTE_REGEX.match(remote) + abort "Git remote 'origin' must match #{REMOTE_REGEX}, got #{remote.inspect}" + end + run!(%w[make verify]) run!(%w[make test]) @@ -28,12 +44,7 @@ def main(version) $stdout.flush abort unless $stdin.gets.chomp == 'Yes' - %w[ - git@gitlab.com:gitlab-org/gitaly.git - git@dev.gitlab.org:gitlab/gitaly.git - ].each do |remote| - run!(%W[git push #{remote} HEAD #{tag_name}]) - end + run!(%W[echo git push origin HEAD #{tag_name}]) end def write_version_file(version) |