13 lines
341 B
Bash
13 lines
341 B
Bash
# Get the version.
|
|
githash=`git rev-parse --short HEAD`
|
|
buildstamp=`date -u '+%Y-%m-%d_%H:%M:%S'`
|
|
commits=`git rev-list --count master`
|
|
# Write out the package.
|
|
cat << EOF > version.go
|
|
// Code generated by version.sh (@generated) DO NOT EDIT.
|
|
package main
|
|
var githash = "$githash"
|
|
var buildstamp = "$buildstamp"
|
|
var commits = "$commits"
|
|
EOF
|