This PR fixes a number of bugs identified with the bump behaviour:
When passing a version with build metadata via either --release-as or through the prebump task, said build metadata is stripped
> npx commit-and-tag-version --skip.tag --skip.commit --release-as 1.2.3-prerelease.0+build.info.123
✔ bumping version in version.txt from 1.1.0 to 1.2.3-prerelease.0
✔ outputting changes to CHANGELOG.md
The use case for this is using versions from another tool, e.g. absolute-version
When passing an invalid version to --release-as or any non-version string from the prebump task, the new version was being output as null
When setting both --release-as and prerelease, the version could be set incorrectly. e.g:
Current version: 99.0.0-prerelease.0
Run command: npx commit-and-tag-version --skip.tag --skip.commit --release-as 100.0.0-prerelease.0 --prerelease prerelease
Resulting version: 99.0.0-prerelease.1
Added clearer errors for invalide/undefined cases, such as an invalid --release-as or conflicting prerelease identifiers between --release-as and --prerelease
BEGIN_COMMIT_OVERRIDE
fix: allow bump task to handle versions with build metadata
fix: handle invalid versions passed to releaseAs
END_COMMIT_OVERRIDE
This PR fixes a number of bugs identified with the bump behaviour:
--release-as
or through the prebump task, said build metadata is strippedThe use case for this is using versions from another tool, e.g. absolute-version
--release-as
or any non-version string from the prebump task, the new version was being output asnull
--release-as
andprerelease
, the version could be set incorrectly. e.g:--release-as
or conflicting prerelease identifiers between--release-as
and--prerelease
BEGIN_COMMIT_OVERRIDE fix: allow bump task to handle versions with build metadata fix: handle invalid versions passed to releaseAs END_COMMIT_OVERRIDE