mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 04:14:25 +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
|
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
|
gotty: server/asset.go main.go server/*.go webtty/*.go backend/*.go Makefile
|
||||||
godep go build
|
godep go build ${BUILD_OPTIONS}
|
||||||
|
|
||||||
asset: server/asset.go
|
asset: server/asset.go
|
||||||
|
|
||||||
|
2
main.go
2
main.go
@ -18,7 +18,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "gotty"
|
app.Name = "gotty"
|
||||||
app.Version = Version
|
app.Version = Version + "+" + CommitID
|
||||||
app.Usage = "Share your terminal as a web application"
|
app.Usage = "Share your terminal as a web application"
|
||||||
app.HideHelp = true
|
app.HideHelp = true
|
||||||
cli.AppHelpTemplate = helpTemplate
|
cli.AppHelpTemplate = helpTemplate
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
var Version = "2.0.0-alpha"
|
var Version = "2.0.0-alpha"
|
||||||
|
var CommitID = "unknown_commit"
|
||||||
|
Loading…
Reference in New Issue
Block a user