Skip to main content

Manage/sync version numbers across all files that contain it, including git tags.

Project description

version-stamper

Manage/sync version numbers across all files that contain it, including git tags - from a single source of truth.

Some projects have version numbers in multiple files, e.g. package.json or setup.py, on a documentation page, etc.

With version stamper, you set the version number in one place (version_stamp.json), configure which files need the version number.

Example

For example, our halchemy library contains packages for Python, Node, and Ruby (more coming in the roadmap!). To keep all of these packages in sync, halchemy's version_stamp.json looks like this:

{
    "version": "1.0.3",
    "files": [
        {
            "path": "./node/halchemy/package.json",
            "pattern": "^  \"version\": \"{version}\","
        },
        {
            "path": "./node/halchemy/package-lock.json",
            "pattern": "^  \"version\": \"{version}\","
        },
        {
            "path": "./python/version.py",
            "pattern": "VERSION = '{version}'"
        },
        {
            "path": "./ruby/halchemy/lib/halchemy/version.rb",
            "pattern": "VERSION = \"{version}\""
        }
    ]
}

Then when you change the version number all you do is:

stamp --set 1.0.4

This updates version_stamp.json (the single source of truth for the version) then applies the version number to all files configured.

Stamp by itself with display the current version

stamp

Tag your git commit

After you commit your code, you can easily tag the commit with:

stamp --tag
git push --tags

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

version_stamper-1.0.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file version_stamper-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for version_stamper-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c621830b79c0bf8ee6c0a0adf797a564a2fefdeb3c6b0690ddee5e84445e013
MD5 791ece1d2409e463dbea0870c6b33840
BLAKE2b-256 f0668a51bf3dcbbd76395fbb332c6f6c3834a0bb83da2fcfaf6062b422d374fe

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