Skip to content

Bash script to increment version numbers in multiple files

License

Notifications You must be signed in to change notification settings

andyexeter/bump_version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Installation

Copy bump_files.sh.dist to bump_files.sh and edit files to bump in the newly created file.

Usage

Increment a semver version part by one:

$ ./bump_version.sh <major|minor|patch>

Fine grained control:

$ ./bump_version.sh <version-from> <version-to>

Hooks

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.

License

Released under the MIT license

About

Bash script to increment version numbers in multiple files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages