-
Notifications
You must be signed in to change notification settings - Fork 6
Read the Scala cross versions from travis file for checking the isLastScalaVersion #709
Read the Scala cross versions from travis file for checking the isLastScalaVersion #709
Conversation
0a62f3c
to
2cd61f6
Compare
@@ -51,7 +51,7 @@ object libraries { | |||
"doobie" -> "0.5.0-M9", | |||
"embedded-redis" -> "0.6", | |||
"export-hook" -> "1.2.0", | |||
"finch" -> "0.16.0-M3", | |||
"finch" -> "0.16.0-RC1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
M3 is more recent than RC1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, bad merge. Thanks for pointing out it.
case _ => None | ||
} | ||
|
||
crossV.lastOption.flatMap(majorMinorV).exists(_ == scalaBinaryV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a chance that someone/we would build artifact(s) for multiple patch version?
2.12.1/2.12.2/2.12.3 ... Would sbt release
run for each version, if labelled in travis.yml
?
Does crossV
/crossScalaVersions
require any order of Scala versions? (lastOption
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will run for each version, but we could put it in the docs. IMHO it's a minor drawback compared to the current issue but we can discuss it here.
Good point, I think I could add a sorted
call before the lastOption
to be sure we get the major version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, having multiple patch versions seems like a very special case.
sorted
sounds good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm thinking loudly, but, another approach could be to parse the Travis file. In that way we could know not only the major Scala version but also the major SBT version.
130745b
to
b8c408d
Compare
Ready for a review! |
val scalaV = extracted.get(scalaVersion) | ||
val crossBuild = extracted.get(crossScalaVersions).toList | ||
val orgBranch = extracted.get(orgCommitBranchSetting) | ||
val baseDir = extracted.get(baseDirectory in LocalRootProject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this baseDir
is different than https://github.com/47deg/sbt-org-policies/pull/709/files#diff-6325ccd2a085563a90de12681230e44aR157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, niche catch, I'll rename this to rootDir
and use the rootDir
here
b215286
to
9efb2ef
Compare
9efb2ef
to
003c6fe
Compare
This PR:
0.8.11
version