Skip to content

Version Functions

🛠️ Tools · ⬅ Home


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 - 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 - Success
  • 1 - Environment error
  • 2 - Argument error

Environment

  • BUILD_RELEASE_NOTES - ApplicationDirectory. Constant for the release notes path. Defaults to ./docs/release.

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.

Arguments

  • --non-interactive - Flag. Optional. If new version is needed, use default version
  • versionName - 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 generated
  • 1 - If new version needs to be created and --non-interactive

Usage

versionNextMinor lastVersion

Converts vX.Y.N to vX.Y.(N+1) so v1.0.0 to v1.0.1

Arguments

  • lastVersion - String. Required. Version to calculate the next minor version.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

isVersion [ --help ] binary

Check if something matches a version

Arguments

  • --help - Flag. Optional. Display this help.
  • binary - String. Required. The binary to look for.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

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 - Success
  • 1 - Environment error
  • 2 - Argument error