mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-09 23:34:26 +00:00
Show commit ID on version
This commit is contained in:
parent
4fd3ac376c
commit
91ee778665
7
Makefile
7
Makefile
@ -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
|
||||
|
||||
|
2
main.go
2
main.go
@ -18,7 +18,7 @@ import (
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "gotty"
|
||||
app.Version = Version
|
||||
app.Version = Version + "+" + CommitID
|
||||
app.Usage = "Share your terminal as a web application"
|
||||
app.HideHelp = true
|
||||
cli.AppHelpTemplate = helpTemplate
|
||||
|
@ -1,3 +1,4 @@
|
||||
package main
|
||||
|
||||
var Version = "2.0.0-alpha"
|
||||
var CommitID = "unknown_commit"
|
||||
|
Loading…
Reference in New Issue
Block a user