maybe right ldflags
This commit is contained in:
parent
afb478c8c7
commit
28bf6a27f9
6
Makefile
6
Makefile
|
@ -1,5 +1,5 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
DATE = $(shell date +%Y.%m.%d)
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
@#./go-clone --work github.com/rclone/rclone
|
@#./go-clone --work github.com/rclone/rclone
|
||||||
|
@ -25,7 +25,7 @@ no-gui: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
GO111MODULE=off go build -v \
|
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:
|
build-go-1.21:
|
||||||
@#GO111MODULE=off /usr/lib/go-1.21/bin/go build -v -ldflags "-X main.VERSION=${VERSION}"
|
@#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:
|
install:
|
||||||
GO111MODULE=off go install -v \
|
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:
|
||||||
goimports -w *.go
|
goimports -w *.go
|
||||||
|
|
2
argv.go
2
argv.go
|
@ -32,5 +32,5 @@ This will recursively clone the app and all the build requirements:
|
||||||
}
|
}
|
||||||
|
|
||||||
func (args) Version() string {
|
func (args) Version() string {
|
||||||
return "go-clone " + VERSION + " " + DATE
|
return "go-clone " + VERSION + " Built on " + BUILDTIME
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue