fix(build): add -trimpath EE-4406 (#7836)
parent
d3edb7ebd5
commit
ab3a6f402e
|
@ -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}' \
|
||||
|
|
|
@ -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}' \
|
||||
|
|
Loading…
Reference in New Issue