Class: Packer::Output::Version
- Inherits:
-
MachineReadable
- Object
- Base
- MachineReadable
- Packer::Output::Version
- Defined in:
- lib/packer/output/version.rb
Overview
Represents the output from packer version.
Instance Method Summary collapse
-
#version ⇒ String
The version of Packer running, only including the major, minor, and patch versions.
-
#version_commit ⇒ String
The SHA1 of the Git commit that build this version of Packer.
-
#version_prerelease ⇒ String
The prerelease tag (if any) for the running version of packer.
Methods inherited from MachineReadable
Methods inherited from Base
Constructor Details
This class inherits a constructor from Packer::Output::Base
Instance Method Details
#version ⇒ String
The version of Packer running, only including the major, minor, and patch versions.
11 12 13 14 |
# File 'lib/packer/output/version.rb', line 11 def version msgs = ('version') msgs[0][3] end |
#version_commit ⇒ String
The SHA1 of the Git commit that build this version of Packer.
19 20 21 22 |
# File 'lib/packer/output/version.rb', line 19 def version_commit msgs = ('version-commit') msgs[0][3] end |
#version_prerelease ⇒ String
The prerelease tag (if any) for the running version of packer.
27 28 29 30 |
# File 'lib/packer/output/version.rb', line 27 def version_prerelease msgs = ('version-prelease') msgs[0][3] end |