fix(build): add -trimpath EE-4406 (#7836)

pull/7848/head
andres-portainer 2022-10-11 13:00:50 -03:00 committed by GitHub
parent d3edb7ebd5
commit ab3a6f402e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ go get -t -d -v ./...
# the build takes 2 seconds
GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build \
-trimpath \
--installsuffix cgo \
--gcflags="-trimpath $(pwd)" \
--ldflags "-s \
--X 'github.com/portainer/portainer/api/build.BuildNumber=${BUILDNUMBER}' \
--X 'github.com/portainer/portainer/api/build.ImageTag=${CONTAINER_IMAGE_TAG}' \

View File

@ -16,7 +16,7 @@ cp -R api ${GOPATH}/src/github.com/portainer/portainer/api
cd 'api/cmd/portainer'
go get -t -d -v ./...
GOOS=${PLATFORM} GOARCH=${ARCH} CGO_ENABLED=0 go build -a --installsuffix cgo --gcflags="-trimpath $(pwd)" --ldflags "-s \
GOOS=${PLATFORM} GOARCH=${ARCH} CGO_ENABLED=0 go build -a -trimpath --installsuffix cgo --ldflags "-s \
-X 'github.com/portainer/portainer/api/build.BuildNumber=${BUILDNUMBER}' \
-X 'github.com/portainer/portainer/api/build.ImageTag=${CONTAINER_IMAGE_TAG}' \
-X 'github.com/portainer/portainer/api/build.NodejsVersion=${NODE_VERSION}' \