This repository has been archived by the owner on Nov 26, 2020. It is now read-only.
forked from kifi/json-annotation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsonatype.sbt
98 lines (87 loc) · 2.83 KB
/
sonatype.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
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")
}
publishArtifact in Test := false
pomIncludeRepository := { _ =>
false
}
sonatypeProfileName := "com.github.vital-software"
pomExtra := (<url>https://github.com/vital-software/json-annotation</url>
<licenses>
<license>
<name>MIT</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:vital-software/json-annotation.git</url>
<connection>scm:git:[email protected]:vital-software/json-annotation.git</connection>
</scm>
<developers>
<developer>
<id>martinraison</id>
<name>Martin Raison</name>
<url>https://github.com/martinraison</url>
</developer>
<developer>
<id>apatzer</id>
<name>Aaron Patzer</name>
<url>https://github.com/apatzer</url>
</developer>
<developer>
<id>mslinn</id>
<name>Mike Slinn</name>
<url>https://github.com/mslinn</url>
</developer>
</developers>)
// PGP settings
pgpPassphrase := Some(Array())
usePgpKeyHex("1bfe664d074b29f8")
// Release settings
releaseTagName := s"${if (releaseUseGlobalVersion.value) (ThisBuild / version).value else version.value}" // Remove v0.x prefix
releaseTagComment := s"Releasing ${(ThisBuild / version).value}\n\n[skip ci]"
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value}\n\n[skip ci]"
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
updateLines,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
releasePublishArtifactsAction := PgpKeys.publishSigned.value
val unreleasedCompare = """^\[Unreleased\]: https://github\.com/(.*)/compare/(.*)\.\.\.HEAD$""".r
updateLinesSchema := Seq(
UpdateLine(
file("README.md"),
_.contains("// Latest release"),
(v, _) => s"""libraryDependencies += "com.github.vital-software" %% "json-annotation" % "$v" // Latest release"""
),
UpdateLine(
file("CHANGELOG.md"),
_.contains("## [Unreleased]"),
(v, _) => s"## [Unreleased]\n\n## [$v] - ${java.time.LocalDate.now}"
),
UpdateLine(
file("CHANGELOG.md"),
unreleasedCompare.unapplySeq(_).isDefined,
(v, compareLine) =>
compareLine match {
case unreleasedCompare(project, previous) =>
s"[Unreleased]: https://github.com/$project/compare/$v...HEAD\n[$v]: https://github.com/$project/compare/$previous...$v"
}
),
)