Skip to content

use sbt-dynver, sbt-ci-release, sbt-travisci #65

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

Merged
merged 1 commit into from
Sep 12, 2019
Merged

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Sep 11, 2019

Use sbt-dynver, sbt-ci-release, sbt-travisci for modules.

Here's how it would look once in use: scala/scala-parallel-collections@master...lrytz:ci-release

I tested things to some degree :-) But opening the PR now to gather some feedback.

What I tested

@lrytz lrytz requested review from SethTisue and dwijnand September 11, 2019 14:00
@SethTisue
Copy link
Member

@ashawley @Philippus @julienrf opinions?

@julienrf
Copy link
Contributor

IIRC I had problems to use sbt-travisci with Scala.js modules, or with matrix configurations. I don’t remember well. Can we test that?

@lrytz
Copy link
Member Author

lrytz commented Sep 11, 2019

IIRC I had problems to use sbt-travisci with Scala.js modules, or with matrix configurations. I don’t remember well. Can we test that?

Will test with Scala.js; that's a good point.

One thing, if I understand correctly, sbt-ci-release closes and releases the staging repo immediately by default. Maybe we want to change this so that the staging repo gets closed, but not released. Have to figure out how.

@SethTisue
Copy link
Member

let's tag in @olafurpg as well in case he has any considerations or cautions for us

@SethTisue
Copy link
Member

sbt-ci-release closes and releases the staging repo immediately by default. Maybe we want to change this so that the staging repo gets closed, but not released

now that (in 2.13) scala-compiler doesn't depend on scala-xml or scala-parser-combinators, and since the 2.11 and 2.12 dependencies are frozen, I think it would be okay to give our module maintainers full releasing powers, since the modules no longer affect the core integrity of Scala itself

@ashawley
Copy link
Member

Yeah, same concern about Scala.js.

I also predict Dotty releases will be a requirement soon enough.

@lrytz
Copy link
Member Author

lrytz commented Sep 11, 2019

I'll do a 2.1.0-M1 release (then M2, ...) of this plugin to bintray so that I can try it out in some modules.

@lrytz lrytz merged commit 0902245 into scala:2.x Sep 12, 2019
@SethTisue
Copy link
Member

not that the numbering really matters, but this feels more like a 3.0 to me 🚀

@lrytz
Copy link
Member Author

lrytz commented Sep 13, 2019

3.0 is fine with me - though i already pushed the changes to the 2.x branch here...

I finished testing this with my travis-test repository, which I turned into a fake scala module. I tested cross-building

  • 2.11, 2.12, 2.13 and dotty
  • Scala.js 0.6 and 1.0
  • JDK 8 and 11

I set it up so that every cross-build combination has its own travis job. When releasing, some jobs are skipped (JDK 11, dotty+Scala.js). Every job that releases creates its own staging repository.

I needed to change sbt-sonatype's sonatypeSessionName to make sure every release job has its unique staging repository name:

// The staging repository name. The default is `[sbt-sonatype] name version`. We cross-build
// using parallel travis jobs, so we include the Scala/Scala.js versions to make them unique.
sonatypeSessionName := {
val sjs = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).map(v => s" Scala.js $v").getOrElse("")
s"${sonatypeSessionName.value} Scala ${scalaVersion.value}$sjs"
},

For now, staging repos are closed but not released. That will be easy to change.

Normal tags v1.2.3 are cross-built. To release for a new Scala version, the tag name looks like v1.2.3#2.14.0-M1.

Config in the test repo:

@lrytz
Copy link
Member Author

lrytz commented Sep 13, 2019

Also, if a job fails because sonatype, one can just re-run it on travis.

@julienrf
Copy link
Contributor

Do you think we could (should?) put the content of https://github.com/lrytz/travis-test/blob/master/build.sh in the sbt plugin so that each Scala module doesn’t have to maintain its own copy of it?

@lrytz
Copy link
Member Author

lrytz commented Sep 13, 2019

I think abstracting over all the special needs of the scripts in each repo would cause more pain than keeping them separate.

@lrytz
Copy link
Member Author

lrytz commented Sep 13, 2019

Released 2.1.0 https://github.com/scala/sbt-scala-module/releases/tag/v2.1.0

Will do some PRs for modules.

@lrytz
Copy link
Member Author

lrytz commented Sep 13, 2019

Here's how it look on oss.sonatype after tagging v0.2.0-RC12 and v0.2.0-RC12#2.13.0-RC3 in the travis-test repo:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants