{"id":17654309,"url":"https://github.com/svenito/versup","last_synced_at":"2025-05-06T21:06:06.092Z","repository":{"id":49867380,"uuid":"255869035","full_name":"Svenito/versup","owner":"Svenito","description":"Version up your project with ease.","archived":false,"fork":false,"pushed_at":"2025-02-12T06:57:53.000Z","size":425,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T21:05:44.871Z","etag":null,"topics":["increment","python3","semantic","versioning"],"latest_commit_sha":null,"homepage":"https://versup.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Svenito.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-15T09:32:45.000Z","updated_at":"2025-02-06T09:26:43.000Z","dependencies_parsed_at":"2024-05-01T07:29:38.376Z","dependency_job_id":"869a7fc2-5fa2-429e-926a-ad461a6500ed","html_url":"https://github.com/Svenito/versup","commit_stats":{"total_commits":216,"total_committers":4,"mean_commits":54.0,"dds":0.06018518518518523,"last_synced_commit":"00b9528d443b549aa1dc7e6c985817961dcd5d6f"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Svenito%2Fversup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Svenito%2Fversup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Svenito%2Fversup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Svenito%2Fversup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Svenito","download_url":"https://codeload.github.com/Svenito/versup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769396,"owners_count":21801376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["increment","python3","semantic","versioning"],"created_at":"2024-10-23T12:13:45.972Z","updated_at":"2025-05-06T21:06:06.063Z","avatar_url":"https://github.com/Svenito.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# versup\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Documentation Status](https://readthedocs.org/projects/versup/badge/?version=latest)](https://versup.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/versup.svg)](https://badge.fury.io/py/versup)\n![Python application](https://github.com/Svenito/versup/workflows/Python%20application/badge.svg?branch=main)\n[![Coverage Status](https://coveralls.io/repos/github/Svenito/versup/badge.svg?branch=main)](https://coveralls.io/github/Svenito/versup?branch=main)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nBump your project version, update version numbers in your files, create a changelog,\nmake a commit, and tag it, all in one easy step. versup is also quite configurable.\n\n# Install\n\nInstall as per normal package from PyPi\n\n`pip install versup`\n\nFor development, clone this repo and run versup with\n\n`uv run versup`\n\n# Quick start\n\nTo get started all versup needs to know is the new version increment or number.\nYou can provide it with a valid semantic version increase such as `patch`, `minor`,\n`major` etc, or an entirely new semantic version like `1.2.5`.\n\nIf you specifiy a version number, then versup will take that version and apply\nit to the current project as is. If you provide an increment, it will get the\nlast version number from either the latest git tag that has a valid version,\nor from the default version in the config file.\n\n# Configuration\n\nVersup has a default configuration which is shown below\n\n```\n{\n    \"force\": False,  # Force the command without prompting the user\n    \"silent\": False,  # Minimize the amount of logs\n    \"files\": {},  # A map of `relativeFilePath: [regex, replacement, regexFlags?] | [regex, replacement, regexFlags?][]`\n    \"version\": {\n        \"enabled\": True,  # Bump the version number\n        \"initial\": \"0.0.0\",  # Initial version\n        \"increments\": [\n            \"major\",\n            \"minor\",\n            \"patch\",\n            \"prerelease\",\n            \"build\",\n        ],  # List of available increments to pick from\n    },\n    \"changelog\": {\n        \"enabled\": True,  # Enable changelog auto-updates\n        \"create\": False,  # Create the changelog file if it doesn\"t exist\n        \"open\": True,  # Open the changelog file after bumping\n        \"file\": \"CHANGELOG.md\",  # Name of the changelog file\n        \"version\": \"### Version [version]\",  # Template for the version line\n        \"commit\": \"- [message]\",  # Template for the commit line\n        \"separator\": \"\\n\",  # Template for the separator between versions sections\n    },\n    \"commit\": {\n        \"enabled\": True,  # Commit the changes automatically\n        \"message\": \"Update version to [version]\",  # Template for the commit message\n        \"mainbranch\": \"master\",  # name of the main development or release branch\n    },\n    \"tag\": {\n        \"enabled\": True,  # Tag the bump commit\n        \"name\": \"v[version]\",  # Template for the name of the tag in the tag message\n    },\n    \"tokens\": {\n        \"date\": {\n            \"format\": \"%Y-%m-%d\"  # Python datetime format to use when generating the `[date]` token\n        },\n        \"version_date\": {\n            \"format\": \"%Y-%m-%d\"  # Python datetime format to use when generating the `[version_date]` token\n        },\n    },\n    \"scripts\": {\n        \"prebump\": \"\",  # Script to execute before bumping the version\n        \"postbump\": \"\",  # Script to execute after bumping the version\n        \"prechangelog\": \"\",  # Script to execute before updating the changelog\n        \"postchangelog\": \"\",  # Script to execute after updating the changelog\n        \"precommit\": \"\",  # Script to execute before committing\n        \"postcommit\": \"\",  # Script to execute after committing\n        \"pretag\": \"\",  # Script to execute before tagging\n        \"posttag\": \"\",  # Script to execute after tagging\n    },\n}\n\n```\n\nIf you want to override any settings, you can do this by creating a `~/.config/versup.json`\nfile or a `.versup.json` in your local project. Versup will read its default settings,\nthen merge in the global config (`~/.config/versup.json`), and finally\nmerge in the project level config.\n\n# Template tags\n\nIn various places you can define what text to use for commit messages, or tags etc.\nThese support tag fields that are replaced with relevant information. Known fields are:\n\n- version: The new version\n- message: The new commit message\n- date: Today's date formatted according to `tokens/date/format` in the config\n- version_date: Today's date formatted according to `tokens/version_date/format` in the config\n- hash: The new commit hash, full length\n- hash4: The new commit hash, first four characters\n- hash7: The new commit hash, first seven characters\n- hash8: The new commit hash, first eight characters\n- author_name: The author name from the git config\n- author_email: The author email from the git config\n\n# Updating files\n\nversup can update versions in files. The way this works is by configuring a regex\nfor each file that you want to update. So for example:\n\n```\n\"files\": {\n    \"README.rst\": [\n      [\"Version ([\\\\d\\\\.]+) \", \"Version [version] \"],\n      [\"Version is ([\\\\d\\\\.]+)\", \"Version is [version]\"]\n    ]\n  },\n```\n\nHere the file `README.rst` is updated by matching a regex `Version ([\\\\d\\\\.]+)`\nwhich will match any text like `Version 1.3` or `Version 1.3.7`. They are standard\nregular expressions. The text that is matched is then replaced with the next argument\n`Version [version]` where `[version]` is the new version. You can regex and replace on\nanything really.\n\nThe supported increments are those supported by [Python Semver](https://python-semver.readthedocs.io/en/latest/usage.html#raising-parts-of-a-version)\n\n- major\n- minor\n- patch\n- prerelease\n- build\n\n# Scripts\n\nThere are a number of pre and post scripts that can be executed at various\nstages of the bump process. These are under the `scripts` section. They are\ncalled as-is and receive the new version number as the only argument. They\ncan be anything, shell scripts, python scripts, etc, but they must be\nexecutable in a regular shell, as they will be invoked as such.\n\nFull Read The Docs can be found at [https://versup.readthedocs.io](https://versup.readthedocs.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenito%2Fversup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvenito%2Fversup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenito%2Fversup/lists"}