Skip to content
Jacob Blain Christen edited this page May 22, 2019 · 3 revisions

git semver -help

HOWTO: Submit SemVer Bumps Without Necessarily Using the Tooling

If you work with a project/repo that has automation setup to utilize the git-semver tooling (such as for automated tagging, see edgexfoundry/go-mod-core-contracts) you might be wondering how you can submit "bumps" to the version stream on a particular branch. Assuming that the project/repo that you work with accepts pull-requests targeting non-master branches this can be as simple as:

# Checkout the `semver` branch.
git checkout -b semver-bump origin/semver

# Edit the "version file" for the target branch, i.e. `master`.
# Use vi/vim/nano/notepad/vscode or whatever your favorite text editor is.
# This tool tries to be lenient but the less trailing whitespace in the form of
# spaces, carriage returns and line-feeds the better (ideally none).
echo -n 0.1.0 > master

# Add the file that you've changed to the index:
git add master

# Commit your changes:
git commit -sm 'semver bump'

# Push your changes up to your fork:
git push origin semver-bump

# Submit the PR making sure that it targets the `semver` branch.

For an example, see edgexfoundry/go-mod-core-contracts#107

Clone this wiki locally