- Semantically versioning via Git tags
- Promoting versions of applications or modules
- Getting the latest version or the latest promoted version from Git tags
Download the latest release
binary for your platform. Make it executable (chmod +x <binary name>) and
move it somewhere on your PATH
GO111MODULE=on go get github.com/azunymous/cdx/cmd/cdxcdx tag allows you to manage your tags for versioning easily. It can be used for
both manual and automated releasing of new versions.
This is designed for multiple versioned applications in a single repository. The format of the tag is:
<module/app name>-<semantic version>
e.g my-app-1.0.0
cdx can be used to mark successful test runs or production candidates.
This results in a tag like the following:
<module/app name>-<semantic version>+<promotion-stage>
e.g my-app-1.0.0+passed-extended-tests
These are currently lightweight tags.
The release command increments the version of the provided application.
cdx tag release -n my-app on a repository with previously tagged
version my-app-0.1.0 for example will bump the version
from my-app-0.1.0 to my-app-0.2.0 for the currently checked out
commit.
The semantic version field to be bumped can be configured with --increment
e.g
cdx tag release -n my-app --increment major
This will promote the current commit to the provided stage for the provided application/module.
e.g if the current commit is tagged my-app-0.1.0.
cdx tag promote -n my-app production
Will tag the checked out commit with my-app-0.1.0+production
The latest command returns the highest version of the application/module.
If you provide a promotion stage, cdx returns the highest version of that module which has been
promoted to that stage instead.
To get only tags of the current commit you can use the --head flag.
You can build cdx with go build ./cmd/cdx at the root of this repository.
You need Go installed with support for Go modules.
- cdx uses lightweight tags for versioning. Currently
latestcan detect annotated tags, but cdx does not support versioning with them. - The
--pushflag delegates togit push, other commands use the go-git library and have no dependencies cdx tagdoes not enforce ordered tagging. If you runcdx tag releasefrom a branch or on an untagged commit, it will search for the highest version across all references. The exception to this is if the--pushflag is used, which makes sure the current commit is onorigin/master.- Pre-releases are currently ignored.
my-app-1.0.0-rc1+passed-extended-testsis ignored and the latest version for thepassed-extended-testsstage ismy-app-0.999.0+passed-extended-testsfor example. The same applies for finding the latest tag in general:0.1.0vs0.2.0-RC1,0.1.0would be returned as the latest version.