forked from splink/cpipe
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
69 lines (65 loc) · 2.2 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
import Dependencies._
import scala.sys.process._
lazy val root = (project in file(".")).
enablePlugins(BuildInfoPlugin).
enablePlugins(JavaAppPackaging, RpmPlugin, DebianPlugin).
settings(
List(
maintainer := "maxmc",
organization := "splink",
scalaVersion := "2.12.8",
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, "commitId" -> "git rev-parse HEAD".!!.slice(0, 10)),
buildInfoPackage := "org.splink.cpipe.config"
) ++ releaseSettings ++ githubReleaseSettings,
fork in run := true,
name := "cpipe",
rpmVendor := "splink",
rpmPackager := Some("splink"),
packageSummary := "Import/Export rows from a Cassandra database.",
packageDescription := "Import/Export rows from a Cassandra database. Run 'cpipe --help' for more information.",
rpmLicense := Some("Apache License Version 2.0"),
packageName := "cpipe",
packageArchitecture := "noarch",
debianPackageDependencies := Seq("java8-runtime-headless"),
libraryDependencies ++= Seq(
logback,
scallop,
cassandra,
lz4,
playJson,
scalaTest % Test,
),
mainClass in Compile := Some("org.splink.cpipe.CPipe")
)
import ReleaseTransformations._
lazy val releaseSettings = Seq(
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
pushChanges,
releaseStepCommand("debian:packageBin"),
releaseStepCommand("rpm:packageBin"),
releaseStepCommand("universal:packageBin"),
releaseStepCommand("githubRelease"),
setNextVersion,
commitNextVersion,
pushChanges,
)
)
lazy val githubReleaseSettings = Seq(
ghreleaseRepoOrg := organization.value,
ghreleaseRepoName := name.value,
ghreleaseAssets := Seq(
target.value / "universal" / s"${name.value}-${version.value}.zip",
target.value / s"${name.value}_${version.value}_all.deb",
target.value / "rpm/RPMS" / packageArchitecture.value / s"${name.value}-${version.value}-1.${packageArchitecture.value}.rpm",
),
ghreleaseNotes := { tagName ⇒
SimpleReader.readLine(s"Input release notes for $tagName: ").getOrElse("")
}
)