-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpublish.sbt
48 lines (41 loc) · 1.18 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
44
45
46
47
48
git.gitTagToVersionNumber := { tag: String =>
if(tag matches "[0-9]+\\..*") Some(tag)
else None
}
useGpg := false
credentials ++= (
for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username,
password
)
).toSeq
pomIncludeRepository := { _ => false }
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
homepage := Some(url("https://github.com/PawelJ-PL/prometheus-metrics-parser"))
scmInfo := Some(
ScmInfo(
url("https://github.com/PawelJ-PL/prometheus-metrics-parser"),
"scm:https://github.com/PawelJ-PL/prometheus-metrics-parser.git"
)
)
developers := List(
Developer(
id = "Pawelj-PL",
name = "Pawel",
email = "[email protected]",
url = url("https://github.com/PawelJ-PL")
)
)
publishMavenStyle := true
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")
}