Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make commit & tag messages build-level settings #205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.8
sbt.version=0.13.15
13 changes: 8 additions & 5 deletions src/main/scala/ReleasePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ object ReleasePlugin extends AutoPlugin {

override def trigger = allRequirements

override val buildSettings: Seq[Setting[_]] = Seq(
releaseUseGlobalVersion := true,

releaseTagName := s"v${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}",
releaseTagComment := s"Releasing ${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}",
releaseCommitMessage := s"Setting version to ${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}"
)

override def projectSettings = Seq[Setting[_]](
releaseSnapshotDependencies := {
val moduleIds = (managedClasspath in Runtime).value.flatMap(_.get(moduleID.key))
Expand All @@ -213,13 +221,8 @@ object ReleasePlugin extends AutoPlugin {
releaseNextVersion := {
ver => Version(ver).map(_.bump(releaseVersionBump.value).asSnapshot.string).getOrElse(versionFormatError)
},
releaseUseGlobalVersion := true,
releaseCrossBuild := false,

releaseTagName := s"v${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}",
releaseTagComment := s"Releasing ${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}",
releaseCommitMessage := s"Setting version to ${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}",

releaseVcs := Vcs.detect(baseDirectory.value),
releaseVcsSign := false,

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.12
# not setting the sbt version explicitly will use the version for the current sbt cross-build