class CreateGithubRelease::Assertions::NoUncommittedChanges
@api public
Checks both the local repository and the remote repository.
Assert that there are no uncommitted changes in the local working copy
def assert
-
(SystemExit)
- if the assertion fails
Returns:
-
(void)
-
def assert print 'Checking that there are no uncommitted changes...' change_count = `git status --porcelain | wc -l`.to_i error "git status command failed: #{$CHILD_STATUS.exitstatus}" unless $CHILD_STATUS.success? if change_count.zero? puts 'OK' else error 'There are uncommitted changes' end end