No project description provided
Project description
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 for 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 its 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 --no-push
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.
Nonsemantic versioning
Vinnie also supports not using semver by just using an
incrementing integer (v1, v2, ... v47) if you wish. 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
--push/--no-push
push or don't push to the repo. The default is to push.
--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
.
--omit-prefix
suppresses the prefix from output. The tag will be processed
using the prefix, but the output will just contain the version numbers such as
0.0.1
.
--semver/--no-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_REPO_PUSH
sets--push
VINNIE_PREFIX
sets--prefix
VINNIE_OMIT_PREFIX
sets--omit-prefix
VINNIE_CURRENT_VERSION
sets--current-version
VINNIE_GIT_REMOTE
sets--remote
VINNIE_VERSION_MARKER
sets--marker
VINNIE_SEMVER=False
sets--no-semver
VINNIE_SEMVER=True
sets--semver
which is the default
Examples
Let's start 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
- 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vinnie-0.8.2.tar.gz
.
File metadata
- Download URL: vinnie-0.8.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e88a73e1f6c061b93f4672bfd8196f8c424b8ee8cf094d6321ac9e72b2a292e |
|
MD5 | a1c6deba16f25a80f36aa69ecddc1ff8 |
|
BLAKE2b-256 | 071b2f4131bbd9622f5203b6c7f299715021e658b77dc102206dffb7395a920d |
File details
Details for the file vinnie-0.8.2-py2.py3-none-any.whl
.
File metadata
- Download URL: vinnie-0.8.2-py2.py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 481304aa0bc6afbc82c42cd50888c1b47d8cd736eafa3418863e06340719721b |
|
MD5 | 408404f1057afd375ad261ae6771f910 |
|
BLAKE2b-256 | 8e9d5cdd504cc23f8f2655a6df74f128180617e5f07ebb337bdb97a47b8e5029 |