Bash script to increment version numbers in multiple files.
The script assumes the existence of a package.json
file so should be used for JavaScript packages.
Initially a Gist I had created but has been converted to a full repo so it can be cloned and used as a submodule for different projects.
Copy bump_files.sh.dist
to bump_files.sh
and edit files to bump in the newly created file.
Increment a semver version part by one:
$ ./bump_version.sh <major|minor|patch>
Fine grained control:
$ ./bump_version.sh <version-from> <version-to>
Add scripts to the hooks/prebump and hooks/postbump directories to have them executed before and after the version bump, respectively. Hook scripts must have a .hook extension.
Released under the MIT license