mirror of
https://github.com/gravitational/teleport
synced 2024-10-19 16:53:57 +00:00
02464f6547
So we're playing nicer with godoc
23 lines
711 B
Makefile
23 lines
711 B
Makefile
GITREF=`git describe --dirty --long --tags`
|
|
|
|
# $(VERSION_GO) will be written to version.go
|
|
VERSION_GO="/* DO NOT EDIT THIS FILE. IT IS GENERATED BY 'make setver'*/\n\n\
|
|
package teleport\n\
|
|
const( Version = \"$(VERSION)\" )\n\
|
|
// Gitref variable is automatically set to the output of "git-describe" \n\
|
|
// during the build process\n\
|
|
var Gitref string\n"
|
|
|
|
# $(GIT_GO) will be written to gitref.go
|
|
GITREF_GO="/* DO NOT EDIT THIS FILE. IT IS GENERATED BY make */ \n\n\
|
|
package teleport\n\
|
|
func init() { Gitref = \"$(GITREF)\"} "
|
|
|
|
#
|
|
# setver updates version.go and gitref.go with VERSION and GITREF vars
|
|
#
|
|
.PHONY:setver
|
|
setver:
|
|
@printf $(VERSION_GO) | gofmt > version.go
|
|
@printf $(GITREF_GO) | gofmt > gitref.go
|