Version Functions
releaseNotes
Output path to current release notes
Usage
releaseNotes [ --application application ] [ version ]
Output path to current release notes
If this fails it outputs an error to stderr
When this tool succeeds it outputs the path to the current release notes file
Arguments
--application application- Optional. Directory. Application home directory.version- Optional. String. Version for the release notes path. If not specified uses the current version.
Examples
open $(bin/build/release-notes.sh)
vim $(releaseNotes)
Sample Output
docs/release/version.md
Return codes
0- Success1- Environment error2- Argument error
Environment
- BUILD_RELEASE_NOTES - ApplicationDirectory. Constant for the release notes path. Defaults to
./docs/release.
releaseNew
Generate a new release notes and bump the version
Usage
releaseNew [ --non-interactive ] [ versionName ]
Return Code: 0 - Release generated or has already been generated
Return Code: 1 - If new version needs to be created and --non-interactive
New release - generates files in system for a new release.
Requires hook version-current, optionally version-live
Uses semantic versioning MAJOR.MINOR.PATCH
Checks the live version versus the version in code and prompts to generate a new release file if needed.
A release notes template file is added at ./documentation/source/release/. This file is
also added to git the first time.
Arguments
--non-interactive- Optional. If new version is needed, use default versionversionName - Optional. Set the new version name to this- must be after live version in version order
Return codes
0- Success1- Environment error2- Argument error
versionNextMinor
Converts vX.Y.N to vX.Y.(N+1) so v1.0.0 to v1.0.1
Usage
versionNextMinor lastVersion
Converts vX.Y.N to vX.Y.(N+1) so v1.0.0 to v1.0.1
Arguments
lastVersion- Required. String. Version to calculate the next minor version.
Return codes
0- Success1- Environment error2- Argument error
isVersion
Check if something matches a version
Usage
isVersion [ --help ] binary
Check if something matches a version
Arguments
--help- Optional. Flag. Display this help.binary- Required. String. The binary to look for.
Return codes
0- Success1- Environment error2- Argument error
versionNoVee
Take one or more versions and strip the leading
v
Usage
versionNoVee
Take one or more versions and strip the leading v
Reads standard input
Versions containing a preceding v character (optionally)
Writes to standard output
Versions with the initial v (if it exists) removed
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error