{"id":15293173,"url":"https://github.com/f3ath/pubspec-version","last_synced_at":"2025-04-13T12:34:40.717Z","repository":{"id":56837500,"uuid":"151514472","full_name":"f3ath/pubspec-version","owner":"f3ath","description":"A CLI tool to get/set/bump the `version` key in pubspec.yaml.","archived":false,"fork":false,"pushed_at":"2020-07-26T19:27:25.000Z","size":42,"stargazers_count":27,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T11:02:31.741Z","etag":null,"topics":["dart","dart-library","dart2","dartlang","flutter","pubspec","pubspec-maintenance"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/pubspec_version","language":"Dart","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/f3ath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-04T03:38:23.000Z","updated_at":"2025-03-17T17:03:48.000Z","dependencies_parsed_at":"2022-09-12T11:20:24.461Z","dependency_job_id":null,"html_url":"https://github.com/f3ath/pubspec-version","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3ath%2Fpubspec-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3ath%2Fpubspec-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3ath%2Fpubspec-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3ath%2Fpubspec-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f3ath","download_url":"https://codeload.github.com/f3ath/pubspec-version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714735,"owners_count":21149958,"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":["dart","dart-library","dart2","dartlang","flutter","pubspec","pubspec-maintenance"],"created_at":"2024-09-30T16:40:04.553Z","updated_at":"2025-04-13T12:34:40.697Z","avatar_url":"https://github.com/f3ath.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The project has moved to [cider](https://pub.dev/packages/cider). This package is archived.\n---\n---\n---\n---\n---\n\nCLI tool to set/bump the `version` key in pubspec.yaml. Semver-compliant (Almost. \nIt uses [pub_semver](https://pub.dartlang.org/packages/pub_semver) which is a bit different.)\n\n## Installing\nInstall the package from the command line:\n```\npub global activate pubspec_version\n```\n\nThis will add the **pubver** binary to your `~/.pub-cache/bin`.\n## Usage\n### Bumping the version\n```\npubver bump \u003cpart\u003e\n``` \nwhere `\u003cpart\u003e` can be either **breaking**, **major**, **minor**, **patch** or **build**.\n\n#### Examples\nBefore | Command | After\n--- | --- | ---\n1.2.3 | `pubver bump breaking`  | 2.0.0\n0.2.1 | `pubver bump breaking`  | 0.3.0\n0.2.1 | `pubver bump major`     | 1.0.0\n0.2.1 | `pubver bump minor`     | 0.3.0\n0.2.1 | `pubver bump patch`     | 0.2.2\n0.2.1 | `pubver bump build`     | 0.2.1+1\n0.2.1+42 | `pubver bump build`     | 0.2.1+43\n0.2.1+foo | `pubver bump build`     | 0.2.1+foo.1\n0.2.1+42.foo | `pubver bump build`     | 0.2.1+43.foo\n0.2.1+foo.bar.1.2 | `pubver bump build`     | 0.2.1+foo.bar.2.0\n\nThe `bump build` command is a bit tricky. It either increments the first numeric part of the build (if there is a \nnumeric part) setting other numeric parts to zeroes, or appends `.1` to the build (otherwise).\n\n### Retaining the build number\nWhen bumping either **major**, **minor**, or **patch** versions, it is possible to retain the existing build number (if any).\nTo do so, pass `--retain-build` (`-b`) flag.\n\nBefore | Command | After\n--- | --- | ---\n1.2.3+42 | `pubver bump breaking`       | 2.0.0\n0.2.1+42 | `pubver bump breaking -b`    | 0.3.0+42\n0.2.1+42 | `pubver bump patch`          | 0.2.2\n0.2.1+42 | `pubver bump patch -b`       | 0.2.2+42\n\n\n### Setting the version\n```\npubver set \u003cversion\u003e\n```\nwhere `\u003cversion\u003e` can be any arbitrary version.\n\n### Getting the version\n```\npubver get\n```\n\n### Output\nThe tool prints the new version to stdout. This allows post processing, e.g. making a git commit.\n```bash\ngit ci . -m \"Release $(pubver bump breaking)\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff3ath%2Fpubspec-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff3ath%2Fpubspec-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff3ath%2Fpubspec-version/lists"}