etcd/scripts/release-version
Brandon Philips a7deba0f90 feat(version): generate version from git tags
This will generate the version based on git tags. So if it is built
directly on a tag it will use the tag name and if it is built off a
commit that isn't a tag it will look like:

    $ curl localhost:7001
    0-267-ga39cf1c
2013-08-06 15:39:30 -07:00

9 lines
99 B
Bash
Executable File

#!/bin/sh
VER=$(git describe --tags HEAD)
cat <<EOF
package main
var releaseVersion = "$VER"
EOF