forked from franekrichardson/bfg-repo-cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.scala
28 lines (26 loc) · 886 Bytes
/
common.scala
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
import sbt._
import Defaults._
import sbtrelease._
import sbtrelease.ReleasePlugin._
import sbtrelease.ReleasePlugin.ReleaseKeys._
import com.typesafe.sbt.pgp.PgpKeys._
import sbtrelease.ReleaseStateTransformations._
object common {
lazy val signedReleaseSettings = releaseSettings ++ Seq(
releaseProcess ~= {
s: Seq[ReleaseStep] =>
lazy val publishArtifactsAction = { st: State =>
val extracted = Project.extract(st)
val ref = extracted.get(Keys.thisProjectRef)
extracted.runAggregated(publishSigned in Global in ref, st)
}
s map {
case `publishArtifacts` => publishArtifacts.copy(action = publishArtifactsAction)
case s => s
} map {
_.copy(enableCrossBuild = false)
}
}
)
def bfgProject(name: String) = Project(name, file(name)) settings signedReleaseSettings
}