Semtag
Table of Contents
WIP
1. Usage
1.1. Library
1.2. CLI
1.2.1. New tag
$ semtag new
DRYRUN: v0.1.0
$ semtag new -run
v0.1.0
$ git tag
v0.1.0
1.2.2. New tag with suffix
$ semtag new -suffix module-a
DRYRUN: v0.1.0-module-a
$ semtag new -suffix module-a -run
v0.1.0-module-a
$ git tag
v0.1.0-module-a
1.2.3. New tag with path suffix
$ semtag new -path-suffix ./cmd/semtag/
DRYRUN: v0.1.0-cmd-semtag
$ semtag new -path-suffix ./cmd/semtag/ -run
v0.1.0-cmd-semtag
$ git tag
v0.1.0-cmd-semtag
$ semtag new -path-suffix ./cmd/semtag/main.go
DRYRUN: v0.1.0-cmd-semtag-main.go
$ semtag new -path-suffix ./cmd/semtag/main.go -run
v0.1.0-cmd-semtag-main.go
$ git tag
v0.1.0-cmd-semtag
v0.1.0-cmd-semtag-main.go
1.2.4. Bump patch/minor/major
$ git tag v0.1.0
$ semtag patch
DRYRUN: v0.1.1
$ semtag patch -run
v0.1.1
$ git tag
v0.1.0
v0.1.1
$ semtag minor
DRYRUN: v0.2.0
$ semtag minor -run
v0.2.0
$ git tag
v0.1.0
v0.1.1
v0.2.0
$ semtag major
DRYRUN: v1.0.0
$ semtag major -run
v1.0.0
$ git tag
v0.1.0
v0.1.1
v0.2.0
v1.0.0
1.2.5. Bump from stdin
$ git tag v0.1.0-module-a
$ git tag v0.1.0-module-b
$ git tag v0.1.1-module-b
$ git tag v0.1.0-module-c
$ git tag | sort -V | grep module-b | semtag patch -stdin
DRYRUN: v0.1.2-module-b
$ git tag | sort -V | grep module-b | semtag patch -stdin -run
v0.1.2-module-b
$ git tag | sort -t- -k3
v0.1.0-module-a
v0.1.0-module-b
v0.1.1-module-b
v0.1.2-module-b
v0.1.0-module-c
1.2.6. Bump with simple search
$ git tag v0.1.0-module-a
$ git tag v0.1.0-module-b
$ git tag v0.1.1-module-b
$ git tag v0.1.0-module-c
$ semtag patch -search module-b
DRYRUN: v0.1.2-module-b
$ semtag patch -search module-b -run
v0.1.2-module-b
$ git tag | sort -t- -k3
v0.1.0-module-a
v0.1.0-module-b
v0.1.1-module-b
v0.1.2-module-b
v0.1.0-module-c