Package: vinnie
Vinnie the VersionerOverviewvinnieis a small utility to handlesemantic versioningusing only git tags.  This can be done either manually or as part of CI.MotivationThe motivation for building Vinnie is somewhat small and trivial. Many existing
tools force you to keep thecurrent versionin 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.UsageCallingvinnieon its own prints the help.vinnie versionprints 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 usingvinnie --no-pushvinnie next (patch|minor|major)determines thenextversion number of the
given level and prints it to stdout.vinnie replace /path/to/filewill replace the marker (default of__VINNIE_VERSION__)
in this file with the current version.vinnie show-configdumps the current configuration Vinnie is operating with,
mostly for debugging.Nonsemantic versioningVinnie also supports not usingsemverby just using an
incrementing integer (v1, v2, ... v47) if you wish.  To do that you need to
always pass in the option--semver=Falseand then the only incrementing
command to use is bump.$vinnie--semver=FalsebumpOptions--reposet the filesystem path to the root of the git checkout--repo-urlset the URL on a supported provider for the repository--ssh-keypath to the ssh key to use on disk--github-tokenGitHub API token--gitlab-tokenGitLab API token--push/--no-pushpush or don't push to the repo. The default is to push.--prefixallows you to set an optional text prefix to all version numbers, for
example,vinnie --prefix=vwould create version numbers such asv0.0.1.--omit-prefixsuppresses the prefix from output. The tag will be processed
using the prefix, but the output will just contain the version numbers such as0.0.1.--semver/--no-semversets whether or not you want to use semantic versioning
or just an incrementing integer. The default is to use semver.--current-versionin 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.Environment VariablesVinnie also listens for environment variables if you would prefer to use those
the following map to the given optionVINNIE_REPO_PATHsets--repoVINNIE_REPO_URLsets--repo-urlVINNIE_SSH_KEYsets--ssh-keyVINNIE_GITHUB_TOKENsets--github-tokenVINNIE_GITLAB_TOKENsets--gitlab-tokenVINNIE_REPO_PUSHsets--pushVINNIE_PREFIXsets--prefixVINNIE_OMIT_PREFIXsets--omit-prefixVINNIE_CURRENT_VERSIONsets--current-versionVINNIE_GIT_REMOTEsets--remoteVINNIE_VERSION_MARKERsets--markerVINNIE_SEMVER=Falsesets--no-semverVINNIE_SEMVER=Truesets--semverwhich is the defaultExamplesLet's start with a simple example:$cdmy-git-repo
$vinnieversion0.0.0
$vinniepatch0.0.1Or maybe you want to use a prefix on with a project that already has been
using semver in a pattern ofvX.Y.Zin tags, you would then just need to do:$cdmy-git-repo
$vinnie--prefix=vversion
v1.2.3
$vinnie--prefix=vminor
v1.3.0Similar ProjectsVinnie is very similar to these other fine projects:bumpversionsemver (js)semver (python)Roadmap / TODOSupport versioning without SSH or the repo with GitHub API TokenSupport versioning without SSH or the repo with GitLab API TokenLicenseBSD LicensedAuthorOriginally written byFrank Wilesfrank@revsys.comand brought to you byREVSYS.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: