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
Location:
bin/build/tools/version.sh
Arguments
--application application- Directory. Optional. Application home directory.version- String. Optional. 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_NOTESRelease Notes Application Path – ApplicationDirectory. Constant for the release notes path. Defaults to./docs/release.
releaseNotesMarkdown
Generate markdown for release notes
Usage
releaseNotesMarkdown [ --count fullCount ] [ --title titleText ] [ --rel rel ] [ --help ] [ --handler handler ]
Outputs full release notes, a separator (title), and then a list to all remaining release notes in markdown.
Output show release notes in reverse version order:
- the catenation of the release notes files (count items)
- a blank line
- the title line and a blank line (or nothing if title line is blank)
- list links to remaining release notes (- [v0.0.1](./0.0.1.md) for example)
Location:
bin/build/tools/version.sh
Arguments
--count fullCount- PositiveInteger. Number of recent release notes to include in the output. Defaults to 5.--title titleText- EmptyString. Markdown text to display between the recent release notes and the links to release notes.--rel rel- EmptyString. Relative link text to display before links. Defaults to.--help- Flag. Optional. Display this help.--handler handler- Function. Optional. Use this error handler instead of the default error handler.
Writes to standard output
markdown
Return codes
0- Success1- Environment error2- Argument error
releaseNew
Generate a new release notes and bump the version
Usage
releaseNew [ --non-interactive ] [ versionName ]
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.
Location:
bin/build/tools/version.sh
Arguments
--non-interactive- Flag. 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- Release generated or has already been generated1- If new version needs to be created and--non-interactive
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
Location:
bin/build/tools/version.sh
Arguments
lastVersion- String. Required. 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
Location:
bin/build/tools/version.sh
Arguments
--help- Flag. Optional. Display this help.binary- String. Required. The binary to look for.
Return codes
0- Success1- Environment error2- Argument error
versionNoVee
Remove
vfrom versions
Usage
versionNoVee [ --help ]
Strip leading v from version tags. Useful when you standardize on the non-v versions or wish to sort without the v.
Take one or more versions and strip the leading v
Location:
bin/build/tools/version.sh
Arguments
--help- Flag. Optional. Display this help.
Reads standard input
Versions containing a preceding v character (optionally)
Writes to standard output
Versions with the initial v (if it exists) removed
Return codes
0- Success1- Environment error2- Argument error