-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sort out versioning, release process, Travis builds (#1)
* Add versioning and release plugins
- Loading branch information
1 parent
934d521
commit 740b989
Showing
11 changed files
with
104 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
language: scala | ||
|
||
scala: | ||
- 2.12.2 | ||
jdk: | ||
- oraclejdk8 | ||
|
||
# Avoid triggering a duplicate build for PRs | ||
branches: | ||
only: | ||
- master | ||
|
||
# http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html | ||
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot/ | ||
before_cache: | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete | ||
- find $HOME/.sbt -name "*.lock" -delete | ||
|
||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION ciBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import sbt._ | ||
|
||
object Aliases { | ||
|
||
lazy val defineCommandAliases = { | ||
addCommandAlias("ciBuild", ";clean; test; schema") ++ | ||
addCommandAlias("ciRelease", ";clean; schema; project scheduler; release with-defaults") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import com.typesafe.sbt.packager.docker.DockerPlugin.autoImport.{Docker => docker} | ||
import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.Universal | ||
import sbt.Keys._ | ||
import sbt.taskKey | ||
import sbtrelease.ReleasePlugin.autoImport._ | ||
import sbtrelease.ReleaseStateTransformations._ | ||
import sbtrelease._ | ||
|
||
object Release { | ||
// Useful tasks to show what versions would be used if a release was performed. | ||
private val showReleaseVersion = taskKey[String]("the future version once releaseNextVersion has been applied to it") | ||
private val showNextVersion = taskKey[String]("the future version once releaseNextVersion has been applied to it") | ||
|
||
lazy val releaseSettings = Seq( | ||
releaseUseGlobalVersion := false, | ||
releaseVersionBump := sbtrelease.Version.Bump.Minor, | ||
releaseTagName := s"${name.value}-${version.value}", | ||
releaseTagComment := s"Releasing ${version.value} of module: ${name.value}", | ||
releasePublishArtifactsAction:= (publish in Universal).value, | ||
releaseProcess := Seq[ReleaseStep]( | ||
checkSnapshotDependencies, | ||
releaseStepCommand(ExtraReleaseCommands.initialVcsChecksCommand), | ||
inquireVersions, | ||
setReleaseVersion, | ||
runTest, | ||
commitReleaseVersion, | ||
tagRelease, | ||
ReleaseStep(releaseStepTask(publish in docker)), | ||
setNextVersion, | ||
commitNextVersion, | ||
pushChanges | ||
), | ||
showReleaseVersion := { val rV = releaseVersion.value.apply(version.value); println(rV); rV }, | ||
showNextVersion := { val nV = releaseNextVersion.value.apply(version.value); println(nV); nV } | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0") | ||
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6") | ||
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.4") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version := "0.1.0-SNAPSHOT" |