diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-07-20 08:37:47 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2022-07-20 09:16:01 +0300 |
commit | 7a62774b50657d14f44dd765bebd2f88e1c835b6 (patch) | |
tree | 4e7b97e013a5f957ae2066abb6d1ef7b7adf59c0 /Rakefile | |
parent | ee04235c2015bbc3c1b7c4c4c39ee4038faf31d3 (diff) |
Automatically push the new stable branch with "bin/rake release:single"axil-lefthook-rakefile
Automatically push the new stable branch when invoking the
release:single Rake task.
Also, disable lefthook since we don't need it when invoking the
Rake tasks as they are used to automate things. The tests are run
anyway in the MRs.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -79,6 +79,10 @@ namespace :release do version = args.version.to_s source_dir = File.expand_path(__dir__) + # Disable lefthook because it was causing some PATH errors + # https://docs.gitlab.com/ee/development/contributing/style_guides.html#disable-lefthook-temporarily + ENV['LEFTHOOK'] = '0' + raise 'You need to specify a version, like 10.1' unless version.match?(%r{\A\d+\.\d+\z}) # Check if local branch exists @@ -130,7 +134,9 @@ namespace :release do `git commit -m 'Release cut #{version}'` puts "\n#{COLOR_CODE_GREEN}INFO: Created new Dockerfile:#{COLOR_CODE_RESET} #{dockerfile}." - puts "#{COLOR_CODE_GREEN}INFO: To push the new branch, run:#{COLOR_CODE_RESET} git push origin #{version}." + puts "#{COLOR_CODE_GREEN}INFO: Pushing the new branch. Don't create a merge request!#{COLOR_CODE_RESET}" + + `git push origin #{version}` end end |