vinnie the versioner
vinnie is a small utility to handle semantic versioning
using only git tags. This can be done either manually or as part of CI.
The motivation was building vinnie is somewhat small and trivial. Many existing tools force you to keep the "current version" in a file in your git repository which often means that during a CI build process you generate a commit that is simply incrementing the version number. By no means is this the end of the world, but we realized we could fairly safely just use git tags as the storage mechanism for the current version.
vinnie on it's own prints the help.
vinnie version prints the current version to stdout.
vinnie (patch|minor|major) increments the version number of the given level, creates the tag, and pushes it. You can skip pushing by using
vinnie next (patch|minor|major) determines the next version number of the
given level and prints it to stdout.
vinnie replace /path/to/file will replace the marker (default of
in this file with the current version.
vinnie show-config dumps the current configuration vinnie is operating with,
mostly for debugging.
Non semantic versioning
Vinnie also supports not using semver by just using an
incrementing integer (v1, v2, ... v47) if you with. To do that you need to
always pass in the option
--semver=False and then the only incrementing
command to use is bump.
$ vinnie --semver=False bump
--repo set the filesystem path to the root of the git checkout
--repo-url set the URL on a supported provider for the repository
--ssh-key path to the ssh key to use on disk
--github-token Github API token
--gitlab-token Gitlab API token
--push/--no-push push or don't push to the repo. Default is to push.
--prefix allows you to set an optional text prefix to all version numbers for
vinnie --prefix=v would create version numbers such as
--semver sets whether or not you want to use semantic versioning or just an
incrementing integer. The default is to use semver.
--current-version in some situations it's nice to be able to just tell vinnie
what the current version is, this option allows you to do that. In this case,
vinnie ignores whatever versions actually exist as tags on the repository.
Vinnie also listens for environment variables if you would prefer to use those the following map to the given option
Let's start off with a simple example:
$ cd my-git-repo $ vinnie version 0.0.0 $ vinnie patch 0.0.1
Or maybe you want to use a prefix on with a project that already has been
using semver in a pattern of
vX.Y.Z in tags, you would then just need to do:
$ cd my-git-repo $ vinnie --prefix=v version v1.2.3 $ vinnie --prefix=v minor v1.3.0
Vinnie is very similar to these other fine projects:
Roadmap / TODO
vinnie validatechecks that tags haven't moved
- Support storing the validation file in S3
- Support storing the validation file in GCS
- Support versioning without SSH or the repo with Github API Token
- Support versioning without SSH or the repo with Gitlab API Token
Keep in touch!
If you have a question about this project, please open a GitHub issue. If you love us and want to keep track of our goings-on, here's where you can find us online: