Skip to content

Commit

Permalink
Fix the release process
Browse files Browse the repository at this point in the history
`sbt release` was complaining of not finding a value for `publishTo`.
This was fixed by replacing `publishArtifacts` with `releaseStepCommandAndRemaining`.

Additionally, I made use of `skip in publish` instead of replacing the publishing tasks.
  • Loading branch information
hosamaly committed Mar 9, 2018
1 parent 578083b commit 3655c47
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ object Build extends BuildDef with BuildCommon {
scalaVersion := Dependencies.scalaVersions.min,
scalacOptions += "-target:jvm-1.8",

dependencyCheckFailBuildOnCVSS := 4,

publishTo := sonatypePublishTo.value,
releasePublishArtifactsAction := PgpKeys.publishSigned.value
dependencyCheckFailBuildOnCVSS := 4
)

private val commonDependencies = Dependencies.xmlParsing

private lazy val mainSettings = commonSettings ++ Seq(
name := "nitf-scala",
publishTo := sonatypePublishTo.value,
libraryDependencies ++= commonDependencies
)

Expand All @@ -59,15 +57,11 @@ object Build extends BuildDef with BuildCommon {
dependencyCheckSkip := true
)

private lazy val disabledPublishingSettings = { import PgpKeys._; Seq(
publish := {},
publishLocal := {},
publishSigned := {},
publishLocalSigned := {},
publishArtifact := false,
sonatypePublishTo := None
)}
val disabledPublishingSettings: Seq[Setting[_]] = Seq(
skip in publish := true
)

val releasePublishAction: TaskKey[_] = PgpKeys.publishSigned
private val releasingProcess = Seq[ReleaseStep](ReleaseStep(identity) /* no-op */
, runClean
, checkSnapshotDependencies
Expand All @@ -77,7 +71,7 @@ object Build extends BuildDef with BuildCommon {
, setReleaseVersion
, commitReleaseVersion
, tagRelease
, publishArtifacts
, releaseStepCommandAndRemaining(s"+${releasePublishAction.key.label}")
, setNextVersion
, commitNextVersion
, pushChanges
Expand Down

0 comments on commit 3655c47

Please sign in to comment.