markchalloner / git-semver

Git plugin for Semantic Versioning
MIT License
382 stars 43 forks source link

Fix stripping VERSION_PREFIX from major versions to prevent creating versions with double versions. #33

Closed oliviabarrick closed 6 years ago

oliviabarrick commented 6 years ago

I had a VERSION_PREFIX=v which caused my versions to have two "v":

➜  fluxcloud git:(master) ✗ git semver --dryrun patch
vv0.2.11
➜  fluxcloud git:(master) ✗

Bash does not interpolate variables inside of single quotes, so this fixes the sed command in version-parse-major to use double quotes so that the VERSION_PREFIX gets properly stripped.

markchalloner commented 6 years ago

Thanks @justinbarrick, good catch.