class CreateGithubRelease::Assertions::LocalReleaseBranchDoesNotExist


@api public
Assert that the release branch does not exist in the local repository

def assert

Raises:
  • (SystemExit) - if the assertion fails

Returns:
  • (void) -
def assert
  print "Checking that local branch ' #{project.release_branch}' does not exist..."
  branches = `git branch --list "#{project.release_branch}"`.chomp
  error 'Could not list branches' unless $CHILD_STATUS.success?
  if branches == ''
    puts 'OK'
  else
    error "Local branch '#{project.release_branch}' already exists"
  end
end