Sha256: 0718726fc70ddfc3c2e4e89dc744ae9b3f42804e733eb89fe392e6fcedfbd5be
Contents?: true
Size: 593 Bytes
Versions: 7
Compression:
Stored size: 593 Bytes
Contents
# Git helper module # TODO: extract as plugin class CfnFlow::Git class << self def sha command = "git rev-parse --verify HEAD" result = `#{command}`.chomp unless $?.success? raise Thor::Error.new("Error running `#{command}`") end result end def check_status unless `git status -s`.empty? raise Thor::Error.new("Git working directory is not clean. Please commit or reset changes in order to release.") end unless $?.success? raise Thor::Error.new("Error running `git status`") end end end end
Version data entries
7 entries across 7 versions & 1 rubygems