增加版本显示

This commit is contained in:
2026-07-06 21:04:25 +08:00
parent 96278fdf37
commit 5134290bf2
3 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ APP_BUNDLE = $(APP_NAME).app
GO = go
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
+3
View File
@@ -0,0 +1,3 @@
package ui
var Version = "dev"
+1
View File
@@ -67,6 +67,7 @@ func (a *App) buildMainWindow() fyne.CanvasObject {
profileButtons,
resetDBBtn,
statusCard,
widget.NewLabel(fmt.Sprintf("v%s", Version)),
)
}