Created
December 12, 2016 15:29
-
-
Save jacoelho/8ff015018f7b4c90e0420606b52ef575 to your computer and use it in GitHub Desktop.
self cookbook version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cookbook_version | |
metadata = Chef::Cookbook::Metadata.new | |
metadata.from_json ::File.read ::File.join ::File.dirname(__dir__), | |
"metadata.json" | |
metadata.version | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment