mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

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
9 lines
99 B
Bash
Executable File
9 lines
99 B
Bash
Executable File
#!/bin/sh
|
|
|
|
VER=$(git describe --tags HEAD)
|
|
|
|
cat <<EOF
|
|
package main
|
|
var releaseVersion = "$VER"
|
|
EOF
|