{"id":22974757,"url":"https://github.com/diversen/bump-py-version","last_synced_at":"2025-09-02T04:39:42.102Z","repository":{"id":215268262,"uuid":"738507958","full_name":"diversen/bump-py-version","owner":"diversen","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-06T21:48:25.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-06T22:30:05.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/diversen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-01-03T11:43:12.000Z","updated_at":"2025-06-06T21:48:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"2413377a-10bb-46d7-8c33-c99400677c2f","html_url":"https://github.com/diversen/bump-py-version","commit_stats":null,"previous_names":["diversen/bump-py-version"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/diversen/bump-py-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fbump-py-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fbump-py-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fbump-py-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fbump-py-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diversen","download_url":"https://codeload.github.com/diversen/bump-py-version/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fbump-py-version/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273233246,"owners_count":25068725,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-15T00:01:01.010Z","updated_at":"2025-09-02T04:39:42.090Z","avatar_url":"https://github.com/diversen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bump-py-version\n\nThis is a simple and opinionated script to bump the version of a python package.\n\n1. The script will check for any changes in the git repository and abort if there are any.\n2. If there are no changes, it will alter files where a `version` is set, e.g. `pyproject.toml` or `__init__.py`. (Which files to alter are specified in the `pyproject.toml` file according to the `tool.bump_version` section.)\n3. The script commits and pushes the changes. \n4. Then a new tag is created using the `version` tag specified.\n5. Finally the script pushes the tag to the remote repository.\n\n## Installation\n\n\u003c!-- LATEST-VERSION-PIPX --\u003e\n\tpipx install git+https://github.com/diversen/bump-py-version@v2.0.3\n\n## Configuration\n\nIt may bump the version in a `__init__.py` file (or similar) using a pyproject settings like the following:\n\n```toml\n[tool.bump_version]\nversion_file = \"bump_py_version/__init__.py\"\n```\n\n**Note** about `setup.py`. `setup.py` should import the version from the `__init__.py` file. Example:\n\n```python\nfrom bump_py_version import __version__\n```\n\nIf you have a pyproject file with a `project.version` or a `tool.poetry.version` section then the script will bump these versions too. \n\nYou may configure the script to alter text files (e.g. `README.md`) by setting the section `tool.bump_version.replace_patterns` in the `pyproject.toml` file. Example:\n\n```toml\n[tool.bump_version.replace_patterns.pip]\nfile = \"README.md\"\nsearch = \"\u003c!-- LATEST-VERSION-PIP --\u003e\"\nreplace = \"\\tpip install git+https://github.com/diversen/bump-py-version@{version}\\n\"\n\n[tool.bump_version.replace_patterns.pipx]\nfile = \"README.md\"\nsearch = \"\u003c!-- LATEST-VERSION-PIPX --\u003e\"\nreplace = \"\\tpipx install git+https://github.com/diversen/bump-py-version@{version}\\n\"\n```\n\nThe above will cause the line below the `search` string to be replaced with the `replace` string. Then it is easy to show the latest version of the package in a `README.md` file.\n\n## Usage example\n\nExample:\n\n```bash\nbump-py-version v0.0.1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fbump-py-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiversen%2Fbump-py-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fbump-py-version/lists"}