Remove underscores from PREVIEW version-numbers, complying with SemVer and fixing for sbt-release
#27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The branch name of
update/non_aws
caused problems with the PREVIEW release workflow in this recent release run for guardian/atom-maker#96 - this error fromsbt-release
killed the run:You can see that
gha-scala-library-release-workflow
's existing branch-name-cleanup code (added with #19) has already cleaned up the original branch nameupdate/non_aws
a bit - making it intoupdatenon_aws
with the slash (/
) stripped out, but it's the remaining underscore (_
) that's causing the problem.The regex
sbt-release
is using for version numbers, defined here (specifically the([\.\-0-9a-zA-Z]*)
bit) doesn't like underscores, so thenon_aws
part is no good, and we get the version format error.The SemVer spec agrees - underscores are not allowed!
Note that the current semver spec (2.0.0) has a tight constraint on allowable characters in versions:
...so
sbt-release
is correct here, we shouldn't allow underscores. Consequently, this change ensures we strip underscores too!