Created
July 26, 2014 18:14
-
-
Save xdev-developer/fc454cbd8ca0c153ea66 to your computer and use it in GitHub Desktop.
Cool app version for deployment (include git branch, commit hash and build time
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
val branch = "git rev-parse --abbrev-ref HEAD".!!.trim | |
val commit = "git rev-parse --short HEAD".!!.trim | |
val buildTime = (new java.text.SimpleDateFormat("yyyyMMdd-HHmmss")).format(new java.util.Date()) | |
version := "%s-%s-%s".format(branch, commit, buildTime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment