Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.

Make sure modules are built and published using the final release #120

Merged
merged 1 commit into from
Jul 23, 2014

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Jul 22, 2014

No description provided.

@@ -187,30 +187,39 @@ sbtResolve() {
# then set the version to the right one and publish (which won't re-gen the docs).
# Also tried publish-local without docs using 'set publishArtifact in (Compile, packageDoc) := false' and republishing, no dice.

# Each buildModule() function is invoked twice: first to build against locker and publish to private-repo, then
# to build against the release and publish to sonatype (or publish-local if publishToSonatype is not "yes").
# In the second round, sbtResolve is always true: the module will be found in the private-repo!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will work, but maybe we should instead have two sbtResolve functions? One that looks in private-repo and one that doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds much better, yes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the sbtResolve should never look in private-repo, no?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! (Assuming we can still overwrite in private-repo, but I think we can. I remember some sbt discussions about this, but not sure about the outcome. /cc @eed3si9n: the internal bootstrapping part of this release scripts is IMO a good exception to the rule that artifacts must never be overwritten -- what's the plan for sbt's publish task and overwriting artifacts?)

@lrytz
Copy link
Member Author

lrytz commented Jul 22, 2014

@adriaanm PTAL


# Create a version of 'repositories-scala-release' without the 'private-repo'.
# sbtResolve should not check in the private-repo, see its doc.
cat $scriptsDir/repositories-scala-release | grep -v private-repo > $baseDir/resolutionScratch_/repositories-without-private-repo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: never mind, other stuff wil break if $baseDir has spaces.
"$baseDir/resolutionScratch_/repositories-without-private-repo" in case $baseDir has spaces

@adriaanm
Copy link

LGTM

@lrytz
Copy link
Member Author

lrytz commented Jul 22, 2014

Hmm, in fact this solution does not work. The problem is that sbtResolve needs the private-repo in order to find the locker scala-library (for example) that was just published into the private repo, when looking up a scala-xml that already exists on maven-central. I guess this is because we pass set every scalaVersion := "'$SCALA_VER'".

I'll go back to the previous solution for now.

@adriaanm
Copy link

ah yes -- a lot of trickery involved here :(

lrytz added a commit that referenced this pull request Jul 23, 2014
Make sure modules are built and published using the final release
@lrytz lrytz merged commit 749c212 into scala:master Jul 23, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants