Skip to content

Commit

Permalink
Merge pull request #1083 from alexarchambault/fix-master-ci
Browse files Browse the repository at this point in the history
Fix 2.12.1 compilation
  • Loading branch information
alexarchambault authored May 11, 2020
2 parents b0b582a + c3b8808 commit 2be8fff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ final class ScriptCompiler(
private def compileFromCache(
settingsArgs: Seq[String],
script: Script,
dependencies: Script.ResolvedDependencies,
dependencies: Script.ResolvedDependencies
): Option[ScriptCompileResult] =
if (inMemoryCache && script.codeSource.path.nonEmpty) {
cleanUpCache()
Expand All @@ -218,7 +218,7 @@ final class ScriptCompiler(
settings0: Settings,
settingsArgs: Seq[String],
script: Script,
dependencies: Script.ResolvedDependencies,
dependencies: Script.ResolvedDependencies
): ScriptCompileResult =
if (inMemoryCache && script.codeSource.path.nonEmpty) {
val key = InMemoryCacheKey(settingsArgs, script, dependencies)
Expand Down
35 changes: 17 additions & 18 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -702,29 +702,28 @@ def partition(publishArtifacts: mill.main.Tasks[PublishModule.PublishData],
def publishSonatype(publishArtifacts: mill.main.Tasks[PublishModule.PublishData],
shard: Int,
divisionCount: Int) =
if (!isMasterCommit) T.command{()}
else T.command{
T.command{

val x: Seq[(Seq[(Path, String)], Artifact)] = {
mill.define.Task.sequence(partition(publishArtifacts, shard, divisionCount))().map{
case PublishModule.PublishData(a, s) => (s.map{case (p, f) => (p.path, f)}, a)
}
}

new SonatypePublisher(
"https://oss.sonatype.org/service/local",
"https://oss.sonatype.org/content/repositories/snapshots",
sys.env("SONATYPE_DEPLOY_USER") + ":" + sys.env("SONATYPE_DEPLOY_PASSWORD"),
Option(sys.env("SONATYPE_PGP_PASSWORD")),
None,
true,
120000,
120000,
T.ctx().log,
120000
).publishAll(
true,
x:_*
)
if (isMasterCommit)
new SonatypePublisher(
"https://oss.sonatype.org/service/local",
"https://oss.sonatype.org/content/repositories/snapshots",
sys.env("SONATYPE_DEPLOY_USER") + ":" + sys.env("SONATYPE_DEPLOY_PASSWORD"),
Option(sys.env("SONATYPE_PGP_PASSWORD")),
None,
true,
120000,
120000,
T.ctx().log,
120000
).publishAll(
true,
x:_*
)
}

0 comments on commit 2be8fff

Please sign in to comment.