Created
September 5, 2016 06:23
-
-
Save tartakynov/751065d7e1f5f561b1a29669a8c51b92 to your computer and use it in GitHub Desktop.
Add public asset with app version (Play Framework)
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
resourceGenerators in Compile <+= (WebKeys.public in Assets, version).map { | |
case (dir, v) => | |
val file = dir / "version.txt" | |
val gitCommit = Process("git rev-parse HEAD").lines.head | |
val content = "version=%s git-commit=%s".format(v, gitCommit) | |
IO.write(file, content) | |
Seq(file) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment