Last active
August 29, 2015 14:23
-
-
Save fedesilva/fddecadd81b553664a3d to your computer and use it in GitHub Desktop.
Putting the sha where it belongs.
This file contains hidden or 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
name := "test-build" | |
organization := "org.cosomojo" | |
version := "1.0.0-SNAPSHOT" | |
val sha = settingKey[String]("current git commit SHA") | |
sha in ThisBuild := Process("git rev-parse HEAD").lines.head.take(8) | |
version := s"${version.value}" + (if (version.value.contains("-SNAPSHOT")) "" else s"-${sha.value}") | |
enablePlugins(BuildInfoPlugin) | |
buildInfoKeys ++= Seq[BuildInfoKey]( | |
name, | |
version, | |
scalaVersion, | |
sbtVersion, | |
sha | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment