Skip to main content

A tool to assist the maintenance of package versioning with scm tags

Project description

Vertagus

Vertagus is a tool to enable automation around maintining versions for your source code via a source control management's tag feature.

Installation

To install vertagus, clone it and then pip install from source:

git clone https://github.com/jdraines/vertagus.git
pip install ./vertagus

Assumptions

Vertagus assumes some things about your development and versioning process:

  • You are using some sort of packaging or distribution tool that contains a structured text document like yaml or toml, and you declare your package version in that document. Vertagus calls these documents "manifests".
  • You are using a source control manager (scm) like git to manage your code's changes.
  • You would like to use your scm's tag feature to track versions. So, for example, if your package version is 1.0.2 currently, you'd like your scm to tag this point in your code's history with something like 1.0.2 (though you can customize the format some.)

What it does

Configuration

Vertagus lets you declare some things about how you'd like to maintain your versioning:

  • Manifests, which are the source of truth for your versioning. (You can declare more than one if you like, but the first one will be considered the authoritative version.)
  • Rules that your versioning should follow. For example, should it match a certain regex pattern? Should it always be incrementally higher than the last version? Is your version required to be in multiple manifests, and you need to know if they are out of sync with each other?
  • Version Aliases whose tags can move around a bit. For example, you might use major-minor-patch semantic versioning, but you'd like to maintain a major-minor alias on whatever your most recent patch version is.
  • Stages of your development process that might need different rules or aliases. This might correspond to names like dev, staging, or prod, or it could be whatever else you like, depending on how you plan to use it.
  • Tag Prefixes in case you're developing in a repository that holds multiple packages. Or maybe you just like prefixes.

You declare these in a vertagus.toml file next to your package in your repository. (See the configuration docs for more on the format of this file.)

Command Line Interface

Vertagus provides two main operations in its vertagus CLI:

validate

The validate command looks like this:

vertagus validate [--stage-name STAGE_NAME --config CONFIG_FILEPATH]

The validate command will check your configuration and run any rules that you have declared there. If any of the rules are being broken by the current state of the code, then it will exit with exit code 1. Otherwise, it exits without error.

create-tag

The create-tag command looks like this:

vertagus create-tag [--stage-name STAGE_NAME --config CONFIG_FILEPATH]

The create-tag command will check your configuration and create tags for the current version of your code as well as for any aliases that may be declared. These tags are created locally, but then pushed to your remote.

Continuous Integration

You may have noticed that the operations described above are a little odd to run just anywhere any time. Vertagus is best suited to be executed in CI automation. For example, you could configure your scm platform to run the validate command when a pull request is created as a check that must pass in order to merge. Then, you could configure your scm platform to run the create-tag command after a pull request has merged and closed.

Documentation

For more documentation, see the docs directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vertagus-0.1.0b7.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vertagus-0.1.0b7-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file vertagus-0.1.0b7.tar.gz.

File metadata

  • Download URL: vertagus-0.1.0b7.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for vertagus-0.1.0b7.tar.gz
Algorithm Hash digest
SHA256 e1fb6d6b60233eb8c13ec5bc07c91c76b7655a1944881f814cea33b09ad2113f
MD5 1df5682da1608d2a3776e7fb6042e2ac
BLAKE2b-256 5bf904797a8982e6b7f5c1eec4ab7a2b6d12ecc5a4eb4003ff6a48a7a7184d15

See more details on using hashes here.

File details

Details for the file vertagus-0.1.0b7-py3-none-any.whl.

File metadata

  • Download URL: vertagus-0.1.0b7-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for vertagus-0.1.0b7-py3-none-any.whl
Algorithm Hash digest
SHA256 536109385cf8459cfd557a600298a85435728de676dac6d92689dfb37a6210c6
MD5 0abc1b5ff9ceb3e5f14503b2f5dab840
BLAKE2b-256 209fd107574f25f3310a0a5bd951ff42cde76abf3456d92a6022fadbfbac187c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page