mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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
This commit is contained in:
8
scripts/release-version
Executable file
8
scripts/release-version
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
VER=$(git describe --tags HEAD)
|
||||
|
||||
cat <<EOF
|
||||
package main
|
||||
var releaseVersion = "$VER"
|
||||
EOF
|
||||
Reference in New Issue
Block a user