I have a Play 2.2.x project, for which I can create universal distribution zip archive:
$ sbt dist
This creates a file target/universal/project-name-1.0-SHAPSHOT.zip
I want to include a git commit sha such that the package generated looks like this:
target/universal/project-name-1.0-SHAPSHOT-0d6d7f4325de87df6a8f46bd635d14ba8892715a.zip
In Play 2 Framework , how can I include git commit sha in sbt dist package name?
Easiest way is:
version := "1.0-SNAPSHOT-" + "git rev-parse HEAD".!!.trim
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With