Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2020-05-22 11:34:10 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2020-05-22 11:34:10 +0300
commite505621c16cf553e912e01f848299be26cad2cbd (patch)
tree9da12f4e39762223c6231c2af371d07aa6b4cef1 /Rakefile
parent6279e06826365a26d5f078c7266166ebea6e3f9a (diff)
Check if a local branch exists and abort the task if true
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index b5789a20..845e545b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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"