diff --git a/openwrt/Makefile b/openwrt/Makefile index 39ac949..d8408f1 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -17,7 +17,7 @@ PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/sunbk201/ua3f -GO_PKG_LDFLAGS_X:= main.version=$(PKG_VERSION) +GO_PKG_LDFLAGS_X:=main.appVersion=v$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk diff --git a/src/main.go b/src/main.go index aecc671..d848355 100644 --- a/src/main.go +++ b/src/main.go @@ -16,7 +16,7 @@ import ( "github.com/sunbk201/ua3f/internal/statistics" ) -const version = "1.8.8" +var appVersion = "Development" func main() { cfg, showVer := config.Parse() @@ -24,11 +24,11 @@ func main() { log.SetLogConf(cfg.LogLevel) if showVer { - fmt.Printf("UA3F version %s\n", version) + fmt.Printf("UA3F version %s\n", appVersion) return } - log.LogHeader(version, cfg) + log.LogHeader(appVersion, cfg) rw, err := rewrite.New(cfg) if err != nil {