mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
modify ldflags
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ RUN VERSION=`grep '"version": ' package.json | awk -F ':' '{print $2}' | tr -d '
|
|||||||
&& BUILD_UNIXTIME="$(date '+%s')" \
|
&& BUILD_UNIXTIME="$(date '+%s')" \
|
||||||
&& VERSION_FLAGS="-X github.com/mayswind/ezbookkeeping/pkg/version.Version=${VERSION} -X github.com/mayswind/ezbookkeeping/pkg/version.CommitHash=${COMMIT_HASH} -X github.com/mayswind/ezbookkeeping/pkg/version.BuildUnixTime=${BUILD_UNIXTIME}" \
|
&& VERSION_FLAGS="-X github.com/mayswind/ezbookkeeping/pkg/version.Version=${VERSION} -X github.com/mayswind/ezbookkeeping/pkg/version.CommitHash=${COMMIT_HASH} -X github.com/mayswind/ezbookkeeping/pkg/version.BuildUnixTime=${BUILD_UNIXTIME}" \
|
||||||
&& CGO_ENABLED=1 \
|
&& CGO_ENABLED=1 \
|
||||||
&& go build -a -v -trimpath -ldflags "-w -linkmode external -extldflags '-static' ${VERSION_FLAGS}" -o ezbookkeeping ezbookkeeping.go
|
&& go build -a -v -trimpath -ldflags "-w -s -linkmode external -extldflags '-static' ${VERSION_FLAGS}" -o ezbookkeeping ezbookkeeping.go
|
||||||
RUN chmod +x ezbookkeeping
|
RUN chmod +x ezbookkeeping
|
||||||
|
|
||||||
# Build frontend files
|
# Build frontend files
|
||||||
|
|||||||
Reference in New Issue
Block a user