{"id":22221652,"url":"https://github.com/ceejbot/semver-bump","last_synced_at":"2025-10-13T06:31:54.040Z","repository":{"id":262491931,"uuid":"887134545","full_name":"ceejbot/semver-bump","owner":"ceejbot","description":"Yet another command-line tool for bumping semver version numbers.","archived":false,"fork":false,"pushed_at":"2024-11-13T05:52:21.000Z","size":30,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"latest","last_synced_at":"2025-01-29T00:43:54.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceejbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-11-12T08:21:20.000Z","updated_at":"2025-01-19T07:34:43.000Z","dependencies_parsed_at":"2024-11-12T18:32:34.114Z","dependency_job_id":"f24ce8ae-1da9-4398-ac65-783a02341889","html_url":"https://github.com/ceejbot/semver-bump","commit_stats":null,"previous_names":["ceejbot/semver-bump"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fsemver-bump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fsemver-bump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fsemver-bump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fsemver-bump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceejbot","download_url":"https://codeload.github.com/ceejbot/semver-bump/tar.gz/refs/heads/latest","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236309831,"owners_count":19128390,"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":[],"created_at":"2024-12-02T23:14:09.914Z","updated_at":"2025-10-13T06:31:54.034Z","avatar_url":"https://github.com/ceejbot.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# semver-bump 🤜🤛\n\n[![Tests](https://github.com/ceejbot/semver-bump/actions/workflows/test.yml/badge.svg)](https://github.com/ceejbot/semver-bump/actions/workflows/test.yml)\n\nA tool for bumping version numbers in a semantic-version-compatible way, designed to be used in a shell scripting context. It takes the previous version number as a command-line argument, bumps the segment you requested to be bumped, and emits the result to `stdout` with no other noise. It also handles bumping pre-release and build identifiers as well, so you can increment `3.0.0-alpha.1` to `3.0.0-alpha.2`.\n\n`semver-bump` may be installed pre-built from the [latest release](https://github.com/ceejbot/semver-bump/releases/latest) on GitHub, or with homebrew via `brew install ceejbot/tap/semver-bump`. You may also build it yourself with `cargo install semver-bump`. It requires at least Rust 1.74.1 to build.\n\n## Usage\n\nThere are five commands. The `prerelease` and `build` commands take an optional replacement identifier string parameter.\n\n```text\n\u003e semver-bump help\n\nBump a semver-compliant version number and write the result to stdout\n\nUsage: semver-bump \u003cCOMMAND\u003e\n\nCommands:\n  major       Bump the major version number for a breaking change\n  minor       Bump the minor version number for a new feature\n  patch       Bump the patch version number for a bug fix\n  prerelease  Bump any version number at the end of a pre-release identifier\n  build       Bump any version number at the end of a build identifier\n  help        Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help     Print help\n  -V, --version  Print version\n```\n\n## Examples\n\nHere we bump the version number of semver-bump itself:\n\n```shell\n#!/usr/bin/env bash\nset -e\nold=$(tomato get package.version Cargo.toml)\nversion=$(cargo run -- \"$1\" \"$old\")\ntomato set package.version \"$version\" Cargo.toml\ncargo check\ngit commit Cargo.toml Cargo.lock -m \"v$version\"\ngit tag \"$version\"\necho \"Release tagged for version $version\"\n```\n\nA nearly identical version of this is in the justfile for this repo. You can use [cargo-edit](https://github.com/killercup/cargo-edit?tab=readme-ov-file#cargo-set-version) for this specific use case if you don't need to manage pre-release or build identifiers. The use case I had in mind was automatic version bumping and tagging for a project in a language other than Rust.\n\nHere are some examples of the prerelease bumping behavior. There are some restrictions on what characters are allowed in the semver prerelease identifiers, and the semver crate's implementation is stricter than some.\n\n```shell\n\u003e semver-bump prerelease 1.2.3-alpha.4\n1.2.3-alpha.5\n\n\u003e semver-bump prerelease 1.2.3-cetialpha4\n1.2.3-cetialpha5\n\n\u003e semver-bump prerelease 1.2.3-ceti-alpha-4\n1.2.3-ceti-alpha-5\n\n\u003e semver-bump prerelease 1.2.3-ceti-alpha-5 beta\n1.2.3-beta.1\n\n\u003e semver-bump prerelease 1.0.0\nError: The current version does not have a prerelease suffix and you did not provide one.\n\n\u003e semver-bump prerelease 1.0.0 +illegal+\nError: unexpected character in pre-release identifier\n```\n\nBumping the build metadata component is an edge use case, but this tool supports doing so if somebody needs it.\n\n```shell\n\u003e semver-bump build 1.0.3-rc.2+build-4\n1.0.3-rc.2+build-5\n```\n\n## LICENSE\n\nThis code is licensed via [the Parity Public License.](https://paritylicense.com) This license requires people who build on top of this source code to share their work with the community, too. See the license text for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceejbot%2Fsemver-bump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceejbot%2Fsemver-bump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceejbot%2Fsemver-bump/lists"}