feat(logging): trim paths from the build EE-4186 (#7710)

pull/7100/head^2
andres-portainer 2 years ago committed by GitHub
parent fad376b415
commit f9fe440401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,5 @@
#!/bin/sh
set -x set -x
mkdir -p dist mkdir -p dist
@ -17,12 +19,13 @@ go get -t -d -v ./...
# the build takes 2 seconds # the build takes 2 seconds
GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build \ GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build \
--installsuffix cgo \ --installsuffix cgo \
--gcflags="-trimpath $(pwd)" \
--ldflags "-s \ --ldflags "-s \
-X 'github.com/portainer/portainer/api/build.BuildNumber=${BUILDNUMBER}' \ --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.ImageTag=${CONTAINER_IMAGE_TAG}' \
-X 'github.com/portainer/portainer/api/build.NodejsVersion=${NODE_VERSION}' \ --X 'github.com/portainer/portainer/api/build.NodejsVersion=${NODE_VERSION}' \
-X 'github.com/portainer/portainer/api/build.YarnVersion=${YARN_VERSION}' \ --X 'github.com/portainer/portainer/api/build.YarnVersion=${YARN_VERSION}' \
-X 'github.com/portainer/portainer/api/build.WebpackVersion=${WEBPACK_VERSION}' \ --X 'github.com/portainer/portainer/api/build.WebpackVersion=${WEBPACK_VERSION}' \
-X 'github.com/portainer/portainer/api/build.GoVersion=${GO_VERSION}'" \ --X 'github.com/portainer/portainer/api/build.GoVersion=${GO_VERSION}'" \
-o "../dist/portainer" \ -o "../dist/portainer" \
./cmd/portainer/ ./cmd/portainer/

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

Loading…
Cancel
Save