Show commit ID on version

This commit is contained in:
Iwasaki Yudai 2017-08-17 14:04:17 +09:00
parent 4fd3ac376c
commit 91ee778665
3 changed files with 6 additions and 4 deletions

View file

@ -1,8 +1,9 @@
OUTPUT_DIR = ./builds
GIT_COMMIT = `git rev-parse HEAD`
GIT_COMMIT = `git rev-parse HEAD | cut -c1-10`
BUILD_OPTIONS = -ldflags "-X main.CommitID=$(GIT_COMMIT)"
gotty: server/asset.go main.go server/*.go webtty/*.go backend/*.go
godep go build
gotty: server/asset.go main.go server/*.go webtty/*.go backend/*.go Makefile
godep go build ${BUILD_OPTIONS}
asset: server/asset.go