go-scmversion

command module
v0.0.0-...-e592ac4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

go-scmversion

Go (approximation) port of https://github.com/RiotGamesMinions/thor-scmversion

Usage

Usage:
  go-scmversion [OPTIONS]

Application Options:
      --current  Print out the current version and end
      --auto     Bump the version based on what is found in the logs; default to #patch
      --major    Update Major version
      --minor    Update Minor version
      --patch    Update Patch version
      --pre=     Update prerelease
      --write    Actually write to git and output file
      --dir=     Directory from which to run the git commands
      --file=    File to write with the updated version number (default: ./VERSION)
      --debug    Enable debug logging of the version process

Help Options:
  -h, --help     Show this help message

3 Phases

A full process involves 3 phases of operation:

  1. Calculate the current version based on the git tags
  2. If no acceptable version is found, it defaults to "0.0.0"
  3. You can limit the execution to just output this via the --current directive.
  4. Increment the version forward the desired way
  5. The --auto directive looks for "#major"/"#minor"/"#patch" in the git logs since the Current tag, and will bump the appropriate level if found.
  6. Store and output the updated version
  7. You must use the --write directive to make this phase happen
  8. This creates the tag locally, pushes tags upstream, and outputs to the --file.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL