Skip to content
Snippets Groups Projects
Volker Schukai's avatar
ee6201ec
History

Bump Version

This tool helps to increment the version number of a project.

You can download the tool here: download.schukai.com/tools/version/.

echo "1.0.0" | version patch
# 1.0.1
echo "1.0.0" | version minor
# 1.1.0
echo "1.0.0" | version major
# 2.0.0

You can also replace directly in files.

YAML

my:
  version: 1.0.0
version patch --path my.yaml --selector my.version

JSON

{
  "my": {
    "version": "1.0.0"
  }
}
version patch --path my.json --selector my.version

Git

Or set git tags directly

version patch --git

Build

With the command build the current build date can be output.

version build

Makefile


build: 
    version patch --path $(PROJECT_ROOT)version.json --selector "version"
    $(eval VERSION := $(shell cat version.json | jq -r .version))
    $(eval BUILD := $(shell version date))
    
    echo "Compiling for every OS and Platform $(VERSION) $(BUILD)"