Skip to content

Instantly share code, notes, and snippets.

@npryce
Created October 14, 2014 09:59
Show Gist options
  • Save npryce/c3ac4e6a3177f9df10db to your computer and use it in GitHub Desktop.
Save npryce/c3ac4e6a3177f9df10db to your computer and use it in GitHub Desktop.
Pass Git version info to SBT
#!/bin/sh
set -e
version=`git describe --tags --match 'v*' --always --dirty=-monkeypatched | cut -c 2-`
sbt -Dversion=$version "$@"
version := StringProp("version").option.getOrElse("local")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment