Skip to main content

vinnie the versioner

Overview

vinnie is a small utility to handle semantic versioning using only git tags. This can be done either manually or as part of CI.

Motivation

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.

Usage

Calling 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.

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 __VINNIE_VERSION__) 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

Options

--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

--prefix allows you to set an optional text prefix to all version numbers for example, vinnie --prefix=v would create version numbers such as v0.0.1.

--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.

Environment Variables

Vinnie also listens for environment variables if you would prefer to use those the following map to the given option

  • VINNIE_REPO_PATH sets --repo
  • VINNIE_REPO_URL sets --repo-url
  • VINNIE_SSH_KEY sets --ssh-key
  • VINNIE_GITHUB_TOKEN sets --github-token
  • VINNIE_GITLAB_TOKEN sets --gitlab-token
  • VINNIE_PREFIX sets --prefix
  • VINNIE_SEMVER sets --semver
  • VINNIE_S3_ACCESS_KEY sets --s3-access-key
  • VINNIE_S3_SECRET_KEY sets --s3-secret-key
  • VINNIE_S3_URL sets --s3-url
  • VINNIE_CURRENT_VERSION sets --current-version
  • VINNIE_REMOTE sets --remote
  • VINNIE_MARKER sets --marker

Examples

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

Similar Projects

Vinnie is very similar to these other fine projects:

Roadmap / TODO

  • vinnie validate checks 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

License

BSD Licensed

Author

Originally written by Frank Wiles frank@revsys.com and brought to you by REVSYS.

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:

Metadata

Release files for vinnie 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vinnie 0.5.2
File Size Uploaded
vinnie-0.5.2.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vinnie 0.5.2
File Interpreter ABI Platform
vinnie-0.5.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 21.8 kB

Release files / vinnie-0.5.2.tar.gz

Download URL vinnie-0.5.2.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f4b84a98d5a054b459126193d19fcba98ba41664fc8645c5e78947238665ad92
BLAKE2b-256 checksum
How to use checksums
abdfc051608bcb4a1a9ffcd522211a2a3875fc93d499a9c699e95b4cf898dfac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / vinnie-0.5.2-py2.py3-none-any.whl

Download URL vinnie-0.5.2-py2.py3-none-any.whl
Size 10.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
536335871e6201959a85b6f701be175ef0b26b16b92dc7860d7dcfe79f0868f4
BLAKE2b-256 checksum
How to use checksums
08e28d05f4e81f53a26ac1128a082267eab9417ac240ade962a2dcedf9e154d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

1 release file

0.6.0

2 release files

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page