sbt-dynver produces named builds, so use those to detect when to use snapshot repo

This commit is contained in:
Johannes Rudolph 2017-10-24 17:24:20 +02:00
parent f82df10711
commit 014e74c68b
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
publishTo := {
val nexus = "https://oss.sonatype.org/"
Some {
if (version.value.trim.endsWith("SNAPSHOT")) "snapshots" at nexus + "content/repositories/snapshots"
else "releases" at nexus + "service/local/staging/deploy/maven2"
if (version.value.trim.contains("+")) "snapshots" at nexus + "content/repositories/snapshots"
else "releases" at nexus + "service/local/staging/deploy/maven2"
}
}