Class: Jets::Cfn::Builders::Util::Source
- Inherits:
-
Object
- Object
- Jets::Cfn::Builders::Util::Source
- Defined in:
- lib/jets/cfn/builders/util/source.rb
Class Method Summary collapse
Class Method Details
.version ⇒ Object
4 5 6 7 8 9 |
# File 'lib/jets/cfn/builders/util/source.rb', line 4 def version return '' unless git_installed? sha = sh "git rev-parse HEAD 2>/dev/null" return '' if sha == '' # if its not a git repo, it'll be an empty string sha[0..7] end |