Skip to content

Commit 9baa972

Browse files
committed
Merge pull request #1311 from felixmulder/topic/publish-snapshots
Add ability to publish snapshots to sonatype
2 parents 7c90f48 + 313f73e commit 9baa972

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

project/Build.scala

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ object DottyBuild extends Build {
192192
addCommandAlias("partest", ";test:package;package;test:runMain dotc.build;lockPartestFile;test:test;runPartestRunner") ++
193193
addCommandAlias("partest-only", ";test:package;package;test:runMain dotc.build;lockPartestFile;test:test-only dotc.tests;runPartestRunner") ++
194194
addCommandAlias("partest-only-no-bootstrap", ";test:package;package; lockPartestFile;test:test-only dotc.tests;runPartestRunner")
195-
)
195+
).
196+
settings(publishing)
196197

197198
/** A sandbox to play with the Scala.js back-end of dotty.
198199
*
@@ -275,6 +276,27 @@ object DottyBuild extends Build {
275276
}
276277
)
277278

279+
lazy val publishing = Seq(
280+
publishMavenStyle := true,
281+
publishMavenStyle := true,
282+
publishArtifact := true,
283+
publishTo := {
284+
val nexus = "https://oss.sonatype.org/"
285+
if (isSnapshot.value)
286+
Some("snapshots" at nexus + "content/repositories/snapshots")
287+
else
288+
Some("releases" at nexus + "service/local/staging/deploy/maven2")
289+
},
290+
publishArtifact in Test := false,
291+
homepage := Some(url("https://github.com/lampepfl/dotty")),
292+
scmInfo := Some(
293+
ScmInfo(
294+
url("https://github.com/lampepfl/dotty"),
295+
"scm:git:[email protected]:lampepfl/dotty.git"
296+
)
297+
)
298+
)
299+
278300
// Partest tasks
279301
lazy val lockPartestFile = TaskKey[Unit]("lockPartestFile", "Creates the lock file at ./tests/locks/partest-<pid>.lock")
280302
lazy val partestLockFile = new File("." + File.separator + "tests" + File.separator + "locks" + File.separator + s"partest-$pid.lock")

0 commit comments

Comments
 (0)