-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathpublish.sbt
43 lines (35 loc) · 1.23 KB
/
publish.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def settingsIfCI[T](setting: => T):Seq[T] = {
for { isCi <- sys.env.get("CI") if isCi.toBoolean } yield setting
}.toSeq
def settingIfCI[T](setting: => T):Option[T] = {
for { isCi <- sys.env.get("CI") if isCi.toBoolean } yield setting
}
credentials ++= settingsIfCI {
Credentials(
"Sonatype Nexus Repository Manager", "oss.sonatype.org",
sys.env.getOrElse("SONATYPE_USERNAME", ""),
sys.env.getOrElse("SONATYPE_PASSWORD", ""))
}
pgpSecretRing := settingIfCI(file("local.secring.gpg")).getOrElse(pgpSecretRing.value)
pgpPublicRing := settingIfCI(file("local.pubring.gpg")).getOrElse(pgpPublicRing.value)
publishMavenStyle := true
pomIncludeRepository := { _ => false }
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
pomExtra :=
<scm>
<url>[email protected]:sbtliquibase/sbt-liquibase-plugin.git</url>
<connection>scm:git:[email protected]:sbtliquibase/sbt-liquibase-plugin.git</connection>
</scm>
<developers>
<developer>
<id>lance</id>
<name>Lance Linder</name>
<url>http://buddho.io/lance</url>
</developer>
</developers>