Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

squash

# Hello World Program in Ruby


source_branch = "hotfix/asf"
squash = false

is_release_branch = (/^(release\/).*$/.match(source_branch))
is_hotfix_branch = (/^(hotfix\/).*$/.match(source_branch))
is_master_branch = source_branch == "master"

if is_release_branch
    puts "Is release"
else
    puts "Is not release"
end

if is_hotfix_branch
    puts "Is hotfix"
else
    puts "Is not hotfix"
end

if is_master_branch
    puts "Is master"
else
    puts "Is not master"
end

if !squash and !is_release_branch and !is_hotfix_branch and !is_master_branch 
   puts "Is not avoidable branch" 
end

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.