Merge pull request #26 from rmm5t/fix-branch-check

Fix branch selection logic for git deploys
master
Tom Vaughan 2013-05-30 08:10:00 -07:00
commit 36ba3b9086
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ EOF
end
#if there is a branch with that name, switch to it, otherwise create a new one and switch to it
if `git branch`.split("\n").delete_if{ |r| r =~ Regexp.new(branch,true) }.count == 0
if `git branch`.split("\n").any? { |b| b =~ /#{branch}/i }
`git checkout #{branch}`
else
`git checkout -b #{branch}`