Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix snapshot versions calculation when the current version ends with -RC. #2002

Merged
merged 1 commit into from Apr 5, 2023

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Apr 5, 2023

Release candidate versions seem to be breaking the snapshot version calculation, which in turn, among other things, breaks the scala-cli-src script.

▶ scala-cli-src version
# (...)
# 1 targets failed
# show 1 targets failed
# finalPublishVersion java.lang.NumberFormatException: For input string: "0-RC1"
#     java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
#    java.base/java.lang.Integer.parseInt(Integer.java:668)
#     java.base/java.lang.Integer.parseInt(Integer.java:786)
#     scala.collection.StringOps$.toInt$extension(StringOps.scala:908)
#     ammonite.$file.project.publish.$anonfun$computePublishVersion$4(publish.sc:73)
#     scala.Option.flatMap(Option.scala:283)
#     ammonite.$file.project.publish.computePublishVersion(publish.sc:69)
#     ammonite.$file.project.publish.$anonfun$finalPublishVersion$5(publish.sc:113)
#     mill.define.Task$TraverseCtx.evaluate(Task.scala:380)

After the fix, seems to work fine.

▶ scala-cli-src version
# (...)
# Scala CLI version: 1.0.1-SNAPSHOT
# Scala version (default): 3.2.2

@Gedochao Gedochao added the bug Something isn't working label Apr 5, 2023
@Gedochao Gedochao merged commit 0226124 into VirtusLab:main Apr 5, 2023
37 checks passed
@Gedochao Gedochao deleted the fix/rc-snapshot-version branch April 5, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants