go-incr increments semantic version in file.
Supports Mac/Linux by now.
go build -o $(go env GOPATH)/bin/incr
You can export path like this:
export PATH=$PATH:$(go env GOPATH)/bin
$ cat VERSION
1.2.3
$ incr VERSION
before: 1.2.3
after : 1.2.4
$ cat VERSION
1.2.4
$ incr
before: 1.2.4
after : 1.2.5
$ cat VERSION
1.2.5
- Use suggested regular expression including test cases
This package can increment semantic version string