class CfnFlow::Git
Git
helper module TODO: extract as plugin
Public Class Methods
check_status()
click to toggle source
# File lib/cfn_flow/git.rb, line 15 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
sha()
click to toggle source
# File lib/cfn_flow/git.rb, line 6 def sha command = "git rev-parse --verify HEAD" result = `#{command}`.chomp unless $?.success? raise Thor::Error.new("Error running `#{command}`") end result end