-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
[2.8.x]: Fix release process #352
[2.8.x]: Fix release process #352
Conversation
Two major problems: 1. It was not promoting the staged repository 2. It was generating two staged repositories This should fix both by using the defaults provided by interplay.
@marcospereira, something went wrong in Travis. Build is failing with error in build definition. |
Sounds like a cyclical dependency on the plugins. |
build.sbt
Outdated
@@ -132,18 +126,15 @@ lazy val commonSettings = Def.settings( | |||
|
|||
lazy val root = project | |||
.in(file(".")) | |||
.enablePlugins(PlayRootProject, ScalaJSPlugin) | |||
.enablePlugins(PlayRootProject, ScalaJSPlugin, PlayNoPublish) |
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.
(I'll ignore ScalaJSPlugin
)
The enablePlugins
above can be expanded to:
PlayRootProject
expands toPlayRootProjectBase &&! PlaySbtCompat.optScriptedAutoPlugin
PlayNoPublish
expands toPlayNoPublishBase &&! BintrayPlugin &&! Sonatype
Then we have:
enablePlugins(
PlayRootProjectBase &&! PlaySbtCompat.optScriptedAutoPlugin, // exclude(ScriptedAutoPlugin)
PlayNoPublishBase &&! BintrayPlugin &&! Sonatype // exclude(BintrayPlugin, Sonatype)
)
Now, PlayRootProjectBase
brings some stuff transitively:
object PlayRootProjectBase extends AutoPlugin {
override def trigger = noTrigger
override def requires = PlayBuildBase && PlayBintrayBase && PlaySonatypeBase && PlayReleaseBase
So the end result looks like:
enablePlugins(
PlayRootProjectBase &&! PlaySbtCompat.optScriptedAutoPlugin, // exclude(ScriptedAutoPlugin)
PlayBuildBase,
PlayBintrayBase, // brings `BintrayPlugin` transitively
PlaySonatypeBase, // brings `Sonatype` transitively
PlayReleaseBase,
PlayNoPublishBase &&! BintrayPlugin &&! Sonatype // exclude(BintrayPlugin, Sonatype)
PlayBuildBase, // transitively added by `PlayNoPublishBase`
)
Which, I guess, looks like:
enablePlugins(
PlayRootProjectBase
PlayBuildBase,
PlayReleaseBase,
PlayNoPublishBase
)
IIUC, the purpose is to not publish the root
project. In that case, we don't want PlayReleaseBase
.
Then, we could be tempted to also remove PlayRootProjectBase
(which is the one bringing in PlayReleaseBase
but PlayRootProjectBase
is defining the crossScalaVersions
)
I don't know what I'm talking about anymore.
OMG, this is so confusing.
According to the docs this aggregating root
project should be a PlayRootProject
and then, each of the aggregated projects that must not be published should be PlayNoPublish
.
Ofc, interplay
being created before sbt 1.x
it's possible that some assumptions no longer hold true in the sbt 1.3+
ecosystem.
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.
I think the NoPublish
is unnecessary and your change above:
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
is enough.
build.sbt
Outdated
@@ -126,7 +126,7 @@ lazy val commonSettings = Def.settings( | |||
|
|||
lazy val root = project | |||
.in(file(".")) | |||
.enablePlugins(PlayRootProject, ScalaJSPlugin, PlayNoPublish) |
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.
As PlayNoPublish
was removed, we need to add the settings manually. I think publish / skip := true
should be enough (as documented here) but maybe re-add publishTo: None
as well.
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.
publish / skip := true
is what we use in other projects (eg https://github.com/playframework/play-grpc/blob/master/project/Publish.scala#L13).
I've ran show publishTo
with this setup and the root
project reports no target (which is what I think we wanted).
How about we merge and we revisit this on the next release?
Two major problems:
This should fix both by using the defaults provided by interplay.