-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
94 lines (72 loc) · 2.41 KB
/
build.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
import sbt.Keys._
import ReleaseTransformations._
name := "lifecycle"
organization := "com.itv"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
scalaVersion := "2.13.6"
crossScalaVersions := Seq("2.11.8", "2.12.1", "2.12.1")
scalacOptions ++= Seq("-feature", "-deprecation")
mdocOut := baseDirectory.value
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
releaseCrossBuild := true
releaseTagComment := s"Releasing ${(ThisBuild / version).value}"
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value}"
releasePublishArtifactsAction := PgpKeys.publishSigned.value
// For Travis CI - see http://www.cakesolutions.net/teamblogs/publishing-artefacts-to-oss-sonatype-nexus-using-sbt-and-travis-ci
credentials ++= (for {
username <- Option(System.getenv().get("SONATYPE_USER"))
password <- Option(System.getenv().get("SONATYPE_PASS"))
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq
pomExtra := (
<url>https://github.com/ITV/lifecycle</url>
<licenses>
<license>
<name>ITV-OSS</name>
<url>http://itv.com/itv-oss-licence-v1.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:ITV/lifecycle.git</url>
<connection>scm:git:[email protected]:ITV/lifecycle.git</connection>
</scm>
<developers>
<developer>
<id>jfwilson</id>
<name>Jamie Wilson</name>
<url>https://github.com/jfwilson</url>
</developer>
<developer>
<id>mcarolan</id>
<name>Martin Carolan</name>
<url>https://mcarolan.net/</url>
<organization>ITV</organization>
<organizationUrl>http://www.itv.com</organizationUrl>
</developer>
</developers>
)
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")
}
pgpPublicRing := file("./ci/public.asc")
pgpSecretRing := file("./ci/private.asc")
pgpSigningKey := Some("-5373332187933973712L")
pgpPassphrase := Option(System.getenv("GPG_KEY_PASSPHRASE")).map(_.toArray)
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges
)