diff --git a/Makefile b/Makefile index 378480a..d36a0bd 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERSION = $(shell git describe --tags) -DATE = $(shell date +%Y.%m.%d) +BUILDTIME = $(shell date +%Y.%m.%d) run: build @#./go-clone --work github.com/rclone/rclone @@ -25,7 +25,7 @@ no-gui: build build: GO111MODULE=off go build -v \ - -ldflags "-X main.VERSION=${VERSION} -X main.DATE=${DATE} -X gui.GUIVERSION=${VERSION}" + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" build-go-1.21: @#GO111MODULE=off /usr/lib/go-1.21/bin/go build -v -ldflags "-X main.VERSION=${VERSION}" @@ -34,7 +34,7 @@ build-go-1.21: install: GO111MODULE=off go install -v \ - -ldflags "-X main.VERSION=${VERSION} -X main.DATE=${DATE} -X gui.GUIVERSION=${VERSION}" + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" goimports: goimports -w *.go diff --git a/argv.go b/argv.go index 7b3a45f..4c2aad3 100644 --- a/argv.go +++ b/argv.go @@ -32,5 +32,5 @@ This will recursively clone the app and all the build requirements: } func (args) Version() string { - return "go-clone " + VERSION + " " + DATE + return "go-clone " + VERSION + " Built on " + BUILDTIME } diff --git a/main.go b/main.go index 0e6b259..4329e0f 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ import ( // sent via -ldflags var VERSION string -var DATE string +var BUILDTIME string var rv *repolist.RepoList