Class: CreateGithubRelease::Assertions::RemoteReleaseTagDoesNotExist
- Inherits:
-
CreateGithubRelease::AssertionBase
- Object
- CreateGithubRelease::AssertionBase
- CreateGithubRelease::Assertions::RemoteReleaseTagDoesNotExist
- Defined in:
- lib/create_github_release/assertions/remote_release_tag_does_not_exist.rb
Overview
Assert that the release tag does not exist in the remote repository
Instance Attribute Summary
Attributes inherited from CreateGithubRelease::AssertionBase
Instance Method Summary collapse
-
#assert
Assert that the release tag does not exist in the remote 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 remote repository
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/create_github_release/assertions/remote_release_tag_does_not_exist.rb', line 32 def assert print "Checking that the remote tag '#{project.next_release_tag}' does not exist..." `git ls-remote --tags --exit-code '#{project.remote}' #{project.next_release_tag} >/dev/null 2>&1` if $CHILD_STATUS.exitstatus == 2 puts 'OK' else error 'Could not list tags' unless $CHILD_STATUS.success? error "Remote tag '#{project.next_release_tag}' already exists" end end |