Closed srt4rulez closed 5 years ago
Thanks for the report. Looking at the code it seems like version-get's return would be the natural place to prefix this.
I can make a PR.
Yes please.
Right, that was my first thought as well, but then the checks for a blank version in patch, minor, and major will possibly never be true (if a version prefix is set)
Unless we strip off the version prefix for that check?
@srt4rulez the checks would still be valid, version-get returns without echoing if it can't parse out a valid version.
Yes, I noticed that after doing some tests. I see you pulled in #27, which has some major changes.
This seems to be fixed from #33.
Using the example plugin without modification, the "current version" argument doesn't contain VERSION_PREFIX config setting.
See output:
Notice how "current version" is "0.1.0" while new version is "v0.2.0" (with v)
This seems to be because the
version-do
method is being called without the VERSON_PREFIX for$version
inversion-major
,version-minor
, andversion-patch
:https://github.com/markchalloner/git-semver/blob/d838cb34780a29d104ed20ef18465c44918b0f64/git-semver.sh#L165
I can make a PR.