mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-09 15:24:25 +00:00
Let git compute version number
This commit is contained in:
parent
9fb9c5ccb8
commit
4a423fdf88
4
Makefile
4
Makefile
@ -1,7 +1,7 @@
|
|||||||
OUTPUT_DIR = ./builds
|
OUTPUT_DIR = ./builds
|
||||||
GIT_COMMIT = `git rev-parse HEAD | cut -c1-7`
|
GIT_COMMIT = `git rev-parse HEAD | cut -c1-7`
|
||||||
VERSION = 1.1.0
|
VERSION = $(shell git describe --tags)
|
||||||
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION) -X main.CommitID=$(GIT_COMMIT)"
|
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION)"
|
||||||
|
|
||||||
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile asset
|
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile asset
|
||||||
go build ${BUILD_OPTIONS}
|
go build ${BUILD_OPTIONS}
|
||||||
|
2
main.go
2
main.go
@ -20,7 +20,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "gotty"
|
app.Name = "gotty"
|
||||||
app.Version = Version + "+" + CommitID
|
app.Version = Version
|
||||||
app.Usage = "Share your terminal as a web application"
|
app.Usage = "Share your terminal as a web application"
|
||||||
app.HideHelpCommand = true
|
app.HideHelpCommand = true
|
||||||
appOptions := &server.Options{}
|
appOptions := &server.Options{}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
var Version = "unknown_version"
|
var Version = "unknown_version"
|
||||||
var CommitID = "unknown_commit"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user