Methods
(inner) getVersion(resource, cb)
Get version value from the HCL resource's property (defined in dot-notation).
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
resource |
Object
|
resource configuration
|
|||||||||
cb |
function
|
standard cb(err, result) callback, result is the version value |
(inner) isReadyForRelease(resource, cb)
Check that the HCL resource is ready for release, i.e. the file can be
parsed and the property exists with a value.
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
resource |
Object
|
resource configuration
|
|||||||||
cb |
function
|
standard cb(err, result) callback, result is true when the resource is ready for release, an error is passed when the file is not configured, the file can't be parsed, or the property doesn't exist or has no value |
(inner) setVersion(version, resource, opts, cb)
Set version value in the HCL resource's property (defined in dot-notation).
This uses hcledit CLI tool to
modify the HCL file because there is no node.js library that can write HCL
files in a safe way while preserving original formatting.
NOTE: hcledit must be installed and available in the PATH for this to work.
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
version |
String
|
version value to set | |||||||||
resource |
Object
|
resource configuration
|
|||||||||
opts |
Object
|
optional settings
|
|||||||||
cb |
function
|
standard cb(err, result) callback |