{"id":19227176,"url":"https://github.com/jv-k/ver-bump","last_synced_at":"2025-04-16T01:09:21.442Z","repository":{"id":40341909,"uuid":"316366990","full_name":"jv-k/ver-bump","owner":"jv-k","description":"📦 A really fast \u0026 lightweight CLI utility that takes care of releasing Git software projects, put together purely with bash scripting.","archived":false,"fork":false,"pushed_at":"2024-07-04T17:52:41.000Z","size":715,"stargazers_count":26,"open_issues_count":3,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-16T01:08:36.054Z","etag":null,"topics":["automation","bump-version","bumpversion","changelog","git","git-branch-develop","package","publish","release","release-automation","semver","ver-bump","version","version-bump","versioning"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ver-bump","language":"Shell","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/jv-k.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-27T00:54:05.000Z","updated_at":"2025-04-14T09:27:05.000Z","dependencies_parsed_at":"2024-11-09T15:26:36.616Z","dependency_job_id":"8dd400e4-51b9-461b-ac80-e65bcc84c188","html_url":"https://github.com/jv-k/ver-bump","commit_stats":{"total_commits":137,"total_committers":2,"mean_commits":68.5,"dds":0.007299270072992692,"last_synced_commit":"9150a7242be5d4f6083b089c17ec6cacad717004"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jv-k%2Fver-bump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jv-k%2Fver-bump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jv-k%2Fver-bump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jv-k%2Fver-bump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jv-k","download_url":"https://codeload.github.com/jv-k/ver-bump/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249178212,"owners_count":21225349,"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":["automation","bump-version","bumpversion","changelog","git","git-branch-develop","package","publish","release","release-automation","semver","ver-bump","version","version-bump","versioning"],"created_at":"2024-11-09T15:22:13.837Z","updated_at":"2025-04-16T01:09:21.397Z","avatar_url":"https://github.com/jv-k.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ver-bump\n\nA fully automated handy CLI utility that takes care of releasing GitHub software projects, written in 100% pure bash.\n\n\u003cp\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/jv-k/ver-bump/main/img/demo.gif?raw=true\"\u003e\n\u003c/p\u003e\n\n[![!#/bin/bash](https://img.shields.io/badge/-%23!%2Fbin%2Fbash-1f425f.svg?logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1w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SqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/)  [![CI](https://github.com/jv-k/ver-bump/actions/workflows/ci.yml/badge.svg)](https://github.com/jv-k/ver-bump/actions/workflows/ci.yml)  [![CodeFactor](https://www.codefactor.io/repository/github/jv-k/ver-bump/badge)](https://www.codefactor.io/repository/github/jv-k/ver-bump)  [![npm version](https://badge.fury.io/js/ver-bump.svg)](https://badge.fury.io/js/ver-bump)  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n## Highlights 📦🚀\n\nIt does several things that are typically required for releasing a Git repository:\n\n- Create a release branch from your current branch (should be a feature or develop branch, following the [Git branch-based workflow](https://nvie.com/posts/a-successful-git-branching-model/), and [tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) the release\n- Enforces [Semantic Versioning](https://semver.org/) specification\n- Avoid potential mistakes associated with manual releases, such as forgetting a step\n- Create and update a changelog file automatically\n- Pushes release to a remote\n- Leaves merging the release branch to the development branch to the user\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n- [Release Steps 👣](#release-steps-)\n  - [Verify + Prepare Release](#verify--prepare-release)\n  - [Create Release](#create-release)\n- [Release Steps: In detail 🔎](#release-steps-in-detail-)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Pre-requisites](#pre-requisites)\n  - [CLI](#cli)\n- [Options](#options)\n- [Example](#example)\n- [Tests](#tests)\n- [Contributing](#contributing)\n- [License](#license)\n\n\u003c/details\u003e\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Release Steps 👣\n\nThe command `ver-bump` will execute the following steps:\n\n### Verify + Prepare Release\n\n- Verify some commits exist\n- Selects a semantic version number for the release branch \u0026 tag\n- Increments / suggests a semantic version number for the release and its tag\n  - Checks to see a tagged release with the chosen version already exists\n\n### Create Release\n\n- Bump version number in `package.json`\n- Write `CHANGELOG.md`\n- Create release branch\n- Commit changes to files made by this script\n- Create a Git tag\n- Push release branch + tag to remote\n\n## Release Steps: In detail 🔎\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003eStep\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd rowspan=\"5\"\u003eVerify + Prepare Release\u003c/td\u003e\n      \u003ctd\u003eProcess user arguments\u003c/td\u003e\n      \u003ctd\u003eCheck and store CLI arguments supplied by user for later processing.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eCheck commits\u003c/td\u003e\n      \u003ctd\u003eVerify some commits exist for release.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eDetermine Release Version\u003c/td\u003e\n      \u003ctd\u003eIf \u003ccode\u003e\u0026lt;package.json\u0026gt;\u003c/code\u003e doesn't exist, warn + exit. \u003cbr\u003e\u003cbr\u003eIf \u003ccode\u003e-v\u003c/code\u003e option is\n        specified, set version from that.\u003cbr\u003e\u003cbr\u003e Or, grab from version from \u003ccode\u003epackage.json\u003c/code\u003e.\u003cbr\u003e\u003cbr\u003eSuggest\n        incremented version number in the form of \u003ccode\u003eMAJOR.MINOR.PATCH\u003c/code\u003e (incrementing \u003ccode\u003ePATCH\u003c/code\u003e), as\n        per Semver 2.0.0.\u003cbr\u003e\u003cbr\u003eGive the user the option to modify/confirm suggested version bump.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eCheck branch exist\u003c/td\u003e\n      \u003ctd\u003eEnsure a release branch with the chosen version number doesn't already exist, if so exit.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eCheck tag exists\u003c/td\u003e\n      \u003ctd\u003eEnsure a tag with the chosen version number doesn't exist, and exit if it does.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd rowspan=\"6\"\u003eCreate Release\u003c/td\u003e\n      \u003ctd\u003eBump version number\u003c/td\u003e\n      \u003ctd\u003eUpdate semantic version number in \u003ccode\u003epackage.json\u003c/code\u003e + stages changes.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eGenerate changelog\u003c/td\u003e\n      \u003ctd\u003eCommits since the last release are automatically added to \u003ccode\u003eCHANGELOG.md\u003c/code\u003e, as well as new commit\n        messages for files modified by this script itself. Stages changes for commit action later.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eCreate release branch\u003c/td\u003e\n      \u003ctd\u003eCreate a branch with the name \u003ccode\u003erelease-MAJOR.MINOR.PATCH\u003c/code\u003e and switch to it (following the \u003ca\n          href=\"https://nvie.com/posts/a-successful-git-branching-model/\" rel=\"nofollow\"\u003eGit branch-based\n          workflow\u003c/a\u003e).\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eCommit changed files\u003c/td\u003e\n      \u003ctd\u003eCommits changes to \u003ccode\u003epackage.json\u003c/code\u003e and CHANGELOG.md` (staged in the previous steps) to the release\n        branch.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eCreate Git tag\u003c/td\u003e\n      \u003ctd\u003eCreate a Git tag referencing the new release version.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ePush\u003c/td\u003e\n      \u003ctd\u003eOptionally, push the release branch to origin.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Requirements\n\nIn order to use `ver-bump` you need:\n\n- To host your project code in a Git repository\n- Have Git installed in your environment\n- Have `npm` and `node` installed\n\n## Installation\n\nInstall the script globally via npm, and use it in any local Git repository to release your project:\n\n```sh\n$ npm install -g ver-bump\n```\n\n## Usage\n\n### Pre-requisites\n\n- Make sure you have `package.json` file in your project and it contains a `\"version\": \"x.x.x\"` parameter\n- You have done some work and have some existing commits\n- You have the ability to push to your Git remote via the Git CLI\n\n### CLI\n\n```sh\n$ ver-bump [-v \u003cversion no.\u003e] [-m \u003crelease message\u003e] [-j \u003cfile1\u003e] [-j \u003cfile2\u003e].. [-n] [-p] [-b] [-h]\n```\n\n## Options\n\n```text\n-v \u003cversion number\u003e     Specify a manual version number\n-m \u003crelease message\u003e    Custom release message\n-f \u003cfilename.json\u003e      Update version number inside JSON files.\n                            * For multiple files, add a separate -f option for each one,\n                            * For example:\n                              ./ver-bump.sh -f src/plugin/package.json -f composer.json\n-p \u003crepository alias\u003e   Push commits to remote repository, eg `-p Origin`\n-n                      Turns off automatic commit\n                            * You may want to do that yourself, for example.\n-b                      Don't create automatic `release-\u003cversion\u003e` branch.\n-c                      Disable updating CHANGELOG.md automatically with new commits\n                        since last release tag.\n-l                      Pause enabled for amending CHANGELOG.md\n-h                      Show help message.\n```\n\n## Example\n\n\u003e This example assumes that a `package.json` contains `version: \"1.0.0\"`, and the user is working in the branch to be released with pre-existing un-released commits.\n\n1. This will create a new Git branch called `release-1.0.1` and a Git tag named `v1.0.1`:\n\n    ```sh\n    $ ver-bump\n    ```\n\n    Output:\n\n    ```text\n    Current version read from \u003cpackage.json\u003e file: 1.0.0\n\n    Enter a new version number or press \u003center\u003e to use [1.0.1]: \u003cpressed enter\u003e\n\n    ––––––\n\n    ✅ Updated file \u003cpackage.json\u003e from 1.0.0 -\u003e 1.0.1\n\n    ✅ Updated [CHANGELOG.md] file\n\n    Make adjustments to [CHANGELOG.md] if required now. Press \u003center\u003e to continue.\n\n    Creating new release branch...\n\n    ✅ Switched to branch 'release-1.0.1'\n    M CHANGELOG.md\n    M package.json\n\n    Committing...\n\n    ✅ [release-1.0.1 ace8b1e] Updated package.json, Updated CHANGELOG.md, Bumped 1.0.0 –\u003e 1.0.1\n    2 files changed, 9 insertions(+), 1 deletion(-)\n\n    ✅ Added GIT tag\n\n    Push tags to \u003corigin\u003e? [N/y]: n\n\n    ––––––\n\n    ✅ Bumped 1.0.0 –\u003e 1.0.1\n\n    🏁 Done!\n    ```\n\n2. After checking out the changes in the branch and confirming them, test the release, and push the release branch to your remote if you didn't choose to push it automatically. Alternatively, use `$ ver-bump -p origin` to bypass the prompt and push the release branch anyway to the remote automatically.\n3. If your code checks out, then open a Pull Request to merge the release branch into your `develop` or main branch.\n\n    You can merge the release branch into your development branch or main branch like this, without fast-forwarding so that the branch topology is preseved as you're merging in a release branch that hasn't diverged (apart from new changes to `CHANGELOG.md` and `package.json`) and you want to ensure it's clearly evident when reading the history that a merge was performed, as opposed to a fast-forward merge, where new commits performed by the merge will become descendents of the last commit before the merge.\n\n    A release branch shouldn't normally diverge from the branch it was created during the time `ver-bump` is operating, so a non-fastforward should be possible instead of a normal merge, which would simply looks like a new commit was made to the main or development branch.\n\n    ```sh\n    $ git checkout develop # Switch to development branch from the new release branch\n\n    $ git merge --no-ff release-1.0.1 # Merge the new release branch to your development branch\n    ```\n\n## Tests\n\nThis project uses [bats](https://github.com/bats-core/bats-core) to test the functionality of ver-bump. \n\nTo run the tests, first install the pre-requisites:\n\nLinux/MacOS: \n\n```sh\n$ npm run tests:install\n```\n\nWindows:\n\n```sh\n$ npm run tests:install:windows\n```\n\nAnd finally, run the test suite:\n\n```sh\n$ npm run tests:run\n```\n\nOutput:\n\n```sh\nver-bump.bats\n ✓ can run script\n ✓ process-arguments: -h: display help message\n ✓ process-arguments: -v: fail when not supplying version\n ✓ process-arguments: -v x.x.x: succeed when supplying version\n ✓ process-arguments: -m: fail when not supplying release note\n ✓ process-arguments: -m \u003cnote\u003e: succeed when supplying release note\n ✓ process-arguments: -f: fail when not supplying filenames\n ✓ process-arguments: -f \u003cfilename.json\u003e: succeed with multiple filenames\n ✓ process-arguments: -p: fail when not supplying push destination\n ✓ process-arguments: -p \u003crepo destination\u003e: succeed when supplying a destination\n ✓ process-arguments: -n: set flag to prevent committing at the end\n ✓ process-arguments: -b: set flag to disable creating a release branch\n ✓ process-arguments: -c: set flag to disable creating/updating CHANGELOG.md\n ✓ process-arguments: -l: set flag to enable pausing after CHANGELOG.md is created\n ✓ process-arguments: fail on not-existing argument\n ✓ set-v-suggest: increments version\n ✓ set-v-suggest: fails to increments non SemVer version\n ✓ process-version: fail on entering non-SemVer input\n ✓ process-version: patch of the version from json file should be bumped +1\n ✓ do-packagefile-bump: can bump version in package.json + lock file\n ✓ bump-json-files: can bump version in a json file\n ✓ bump-json-files: can fail bumping a json file when a version already exists in file\n ✓ bump-json-files: can fail bumping a json file when no version found inside it\n ✓ check-branch-notexist: can detect branch DOES exist\n ✓ check-branch-notexist: can confirm branch DOES'NT exist\n ✓ do-branch: can create a release branch\n ✓ do-tag: create a tag\n ✓ check-tag-exists: check doesn't exist\n ✓ check-tag-exists: check it exists\n ✓ do-changelog: can create a CHANGELOG.md\n\n30 tests, 0 failures\n```\n\n## Contributing\n\nI'd love you to contribute to `@jv-k/ver-bump`, [pull requests](https://github.com/jv-k/ver-bump/issues/new/choose) are welcome for submitting issues and bugs!\n\n## License\n\nThe scripts and documentation in this project are released under the [MIT license](https://github.com/jv-k/ver-bump/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjv-k%2Fver-bump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjv-k%2Fver-bump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjv-k%2Fver-bump/lists"}