A git plugin to make adherance to Semantic Versioning 2.0.0 easier, with its own plugin architecture for optional version management of:
- Keep a Changelog CHANGELOG.md file
- NPM package.json file
- ...
See PLUGINS.md for a description of plugins.
Semantic Versioning 2.0.0 is a scheme for versioning, which includes 3 parts e.g. 3.2.1 the components of which are:
- Major: Used only for backward compatible breaking changes, i.e. when we have an all new theme etc.
- Minor: Used for normal development, i.e. creating a new template
- Bug fixes
Via git clone.
The installer installs git-semver into the first of the following directories that exist and are in the path:
- /usr/local/bin
- /usr/bin
- /bin
In Linux, OSX and Windows Cygwin the installer will create a symlink. In Windows MinGW creates a stub instead.
(git clone git@github.com:markchalloner/git-semver.git && \
cd git-semver && git checkout $(
git tag | grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$' | \
sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -n 1
) && sudo ./install.sh)
The installer will not overwrite any existing configuration or plugins.
git semver getWill return empty if no version has been created.
Versions are created as tags and are generated using:
git semver [major|minor|patch|next]Increment the patch component (0.1.0 -> 0.1.1)
git semver patch|nextIf no version has been created, the initial version will be: 0.1.0
Increment the minor component (0.1.0 -> 0.2.0)
git semver minorIf no version has been created, the initial version will be: 0.1.0
Increment the major component (0.1.0 -> 1.0.0)
git semver majorIf no version has been created, the initial version will be: 1.0.0
See [Updates]
git semver updateRun git semver with no arguments to see usage
git semver [help]Git-semver will check for a configuration file in the following locations (and use the one that exists):
${XDG_CONFIG_HOME}/.git-semver/config${HOME}/.git-semver/config
Git-semver will default to ${HOME}/.git-semver/config if no configuration file is found.
An example configuration file with the default settings can be found at config.example.
The tool has a built in updater that checks for a new version of git semver
git semver updateBy default it will automatically check for a new version daily. The automatic check can be disabled by changing the configuration setting:
UPDATE_CHECK=0The updaate check interval in days can be set by changing the configuration setting:
UPDATE_CHECK_INTERVAL_DAYS=1The date of the last check is saved in ${HOME}/.git-semver/update
Via uninstaller in clone directory. Navigate to your original clone directory and run:
sudo git-semver/uninstall.sh [-p|--purge]The purge switch will additionally remove the configuration directory.
git-semver is installed by placing a symlink/stub in one of the bin directories in the path.
- ${HOME}/bin
- /usr/local/bin
- /usr/bin
- /bin
It can be deleted easily:
sudo rm $(which git-semver)The configuration directory can be removed with:
rm -rf ${HOME}/.git-semverPlease see CHANGELOG.md for more information what has changed recently.
Please see CONTRIBUTING.md for details.