Thanks to sbt's Process API, you actually need very little to include the git hash in your version:
version in ThisBuild := "1.0-" + Process("git rev-parse HEAD").lines.head
Use git rev-parse --short HEAD
for the short version of a git hash.
Of course for better reuse, you could move the Process
part into its own setting and just do something like:
version in ThisBuild <<= gitSha("1.0-" + _)