forked from sbt/sbt-paradox-material-theme
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpublish.sbt
46 lines (45 loc) · 1.5 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
val repo = new {
val org = "jkugiya"
val name = "paradox-material-theme"
val path = org + "/" + name
}
inThisBuild(Def.settings(
organization := "com.github.jkugiya",
licenses += "MIT" -> url("https://github.com/jkugiya/paradox-material-theme/blob/master/LICENSE"),
homepage := Some(url("https://github.com/jkugiya/paradox-material-theme")),
scmInfo := Some(
ScmInfo(
url(s"https://github.com/jkugiya/paradox-material-theme"),
s"scm:git:git@github.com:${repo.path}.git"
)
),
developers := List(
Developer("jkugiya", "Jiro Kugiya", "j.kugiya@gmail.com", url("https://github.com/jkugiya"))
),
// Workaround NPE when publishing: https://github.com/sbt/sbt/issues/3519
updateOptions := updateOptions.value.withGigahorse(false),
publishMavenStyle := true,
publishArtifact in Test := false,
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")
},
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,
versionWithGit,
git.useGitDescribe := true,
git.remoteRepo := s"git@github.com:${repo.path}.git"
))