diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-22 11:34:10 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-22 11:34:10 +0300 |
commit | e505621c16cf553e912e01f848299be26cad2cbd (patch) | |
tree | 9da12f4e39762223c6231c2af371d07aa6b4cef1 /Rakefile | |
parent | 6279e06826365a26d5f078c7266166ebea6e3f9a (diff) |
Check if a local branch exists and abort the task if true
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -113,6 +113,11 @@ namespace :release do https://docs.gitlab.com/ee/development/documentation/site_architecture/release_process.html#1-add-the-chart-version') end + # Check if local branch exists + if local_branch_exist?(version) + abort("Rake aborted! The branch already exists. Delete it with `git branch -D #{version}` and rerun the task.") + end + # Stash modified and untracked files so we have "clean" environment # without accidentally deleting data puts "Stashing changes" |