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
path: root/lib
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 /lib
parent6279e06826365a26d5f078c7266166ebea6e3f9a (diff)
Check if a local branch exists and abort the task if true
Diffstat (limited to 'lib')
-rw-r--r--lib/task_helpers.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/task_helpers.rb b/lib/task_helpers.rb
index b3be0010..be79af49 100644
--- a/lib/task_helpers.rb
+++ b/lib/task_helpers.rb
@@ -51,6 +51,11 @@ def git_workdir_dirty?
!status.empty?
end
+def local_branch_exist?(branch)
+ status = `git branch --list #{branch}`
+ !status.empty?
+end
+
def chart_version_added?(gitlab_version)
config = YAML.load_file('./content/_data/chart_versions.yaml')
config.key?(gitlab_version)