Skip to content

Commit

Permalink
Better align with firehose; use localExtraSteps.
Browse files Browse the repository at this point in the history
Brings in additional ReleaseSteps on snapshot.
  • Loading branch information
tonytw1 committed Nov 9, 2023
1 parent a324760 commit a2122bd
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,41 @@ lazy val mavenSettings = Seq(
val snapshotReleaseType = "snapshot"

lazy val releaseProcessSteps: Seq[ReleaseStep] = {
val commonSteps: Seq[ReleaseStep] = Seq(
val commonSteps:Seq[ReleaseStep] = Seq(
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion
setReleaseVersion,
)

val snapshotSteps: Seq[ReleaseStep] = Seq(
publishArtifacts,
releaseStepCommand("sonatypeReleaseAll")
)

val prodSteps: Seq[ReleaseStep] = Seq(
val localExtraSteps:Seq[ReleaseStep] = Seq(
commitReleaseVersion,
tagRelease,
publishArtifacts,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
commitNextVersion
)

val snapshotSteps:Seq[ReleaseStep] = Seq(
publishArtifacts,
releaseStepCommand("sonatypeReleaseAll")
)

val prodSteps:Seq[ReleaseStep] = Seq(
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease")
)

val localPostRelease: Seq[ReleaseStep] = Seq(
val localPostRelease:Seq[ReleaseStep] = Seq(
pushChanges,
)

(sys.props.get("RELEASE_TYPE"), sys.env.get("CI")) match {
case (Some(v), None) if v == snapshotReleaseType => commonSteps ++ snapshotSteps ++ localPostRelease
case (_, None) => commonSteps ++ prodSteps ++ localPostRelease
case (Some(v), None) if v == snapshotReleaseType => commonSteps ++ localExtraSteps ++ snapshotSteps ++ localPostRelease
case (_, None) => commonSteps ++ localExtraSteps ++ prodSteps ++ localPostRelease
case (Some(v), _) if v == snapshotReleaseType => commonSteps ++ snapshotSteps
case (_, _) => commonSteps ++ prodSteps
case (_, _)=> commonSteps ++ prodSteps
}
}

Expand Down

0 comments on commit a2122bd

Please sign in to comment.