Class: CreateGithubRelease::Assertions::LocalReleaseTagDoesNotExist
- Inherits:
-
CreateGithubRelease::AssertionBase
- Object
- CreateGithubRelease::AssertionBase
- CreateGithubRelease::Assertions::LocalReleaseTagDoesNotExist
- Defined in:
- lib/create_github_release/assertions/local_release_tag_does_not_exist.rb
Overview
Assert that the release tag does not exist in the local repository
Instance Attribute Summary
Attributes inherited from CreateGithubRelease::AssertionBase
Instance Method Summary collapse
-
#assert
Assert that the release tag does not exist in the local repository.
Methods inherited from CreateGithubRelease::AssertionBase
#backtick_debug?, #error, #initialize, #print, #puts
Methods included from BacktickDebug
Constructor Details
This class inherits a constructor from CreateGithubRelease::AssertionBase
Instance Method Details
#assert
This method returns an undefined value.
Assert that the release tag does not exist in the local repository
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/create_github_release/assertions/local_release_tag_does_not_exist.rb', line 31 def assert print "Checking that local tag '#{project.next_release_tag}' does not exist..." = `git tag --list "#{project.next_release_tag}"`.chomp error 'Could not list tags' unless $CHILD_STATUS.success? if == '' puts 'OK' else error "Local tag '#{project.next_release_tag}' already exists" end end |