增加版本显示
This commit is contained in:
@@ -9,7 +9,9 @@ APP_BUNDLE = $(APP_NAME).app
|
|||||||
|
|
||||||
GO = go
|
GO = go
|
||||||
CGO_ENABLED = 1
|
CGO_ENABLED = 1
|
||||||
LDFLAGS = -s -w
|
GIT_HASH = $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||||
|
VERSION = 0.1.0-$(GIT_HASH)
|
||||||
|
LDFLAGS = -s -w -X lmvpn/internal/ui.Version=$(VERSION)
|
||||||
|
|
||||||
.PHONY: all build app run daemon clean vet tidy fmt icon
|
.PHONY: all build app run daemon clean vet tidy fmt icon
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package ui
|
||||||
|
|
||||||
|
var Version = "dev"
|
||||||
@@ -67,6 +67,7 @@ func (a *App) buildMainWindow() fyne.CanvasObject {
|
|||||||
profileButtons,
|
profileButtons,
|
||||||
resetDBBtn,
|
resetDBBtn,
|
||||||
statusCard,
|
statusCard,
|
||||||
|
widget.NewLabel(fmt.Sprintf("v%s", Version)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user