From 2a70fd933188b7ee3408ac074db00a768a902dce Mon Sep 17 00:00:00 2001 From: kaedwen Date: Sun, 3 Mar 2024 12:42:40 +0100 Subject: [PATCH] add trimpath --- Makefile | 2 +- build-cross.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index bfa262f..92c74f2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ build: - CGO_ENABLED=1 go build -mod=vendor -tags=embed -o service main.go + CGO_ENABLED=1 go build -mod=vendor -tags=embed -ldflags "-s -w" -trimpath -o service main.go build-static: npm --prefix static ci && npm --prefix static run build diff --git a/build-cross.sh b/build-cross.sh index 61ef2bf..c34900c 100755 --- a/build-cross.sh +++ b/build-cross.sh @@ -1,19 +1,15 @@ #!/bin/sh -GOVERSION=${GOVERSION:-1.20.5} +GOVERSION=${GOVERSION:-1.22} CONTAINER=${PREFIX}-${ARCH} # prepare podman build -t ${CONTAINER} -f - <