From 61e2308e6f7077d78635fd29804db635636a059c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 3 Feb 2020 01:22:38 +0100 Subject: [PATCH] build binaries without debug information --- .drone.star | 2 +- .drone.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.star b/.drone.star index 773f284..630b652 100644 --- a/.drone.star +++ b/.drone.star @@ -63,7 +63,7 @@ def binaries(arch): 'commands': [ '[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}', 'mkdir -p release/', - "cd cmd/url-parser && xgo -ldflags \"-X main.Version=$BUILD_VERSION\" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out url-parser-$BUILD_VERSION .", + "cd cmd/url-parser && xgo -ldflags \"-s -w -X main.Version=$BUILD_VERSION\" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out url-parser-$BUILD_VERSION .", 'cp /build/* /drone/src/release/' ] }, diff --git a/.drone.yml b/.drone.yml index 2c5cab2..de0451f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,7 +39,7 @@ steps: commands: - "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}" - mkdir -p release/ - - cd cmd/url-parser && xgo -ldflags "-X main.Version=$BUILD_VERSION" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out url-parser-$BUILD_VERSION . + - cd cmd/url-parser && xgo -ldflags "-s -w -X main.Version=$BUILD_VERSION" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out url-parser-$BUILD_VERSION . - cp /build/* /drone/src/release/ - name: executable @@ -111,6 +111,6 @@ depends_on: --- kind: signature -hmac: f891a7f6d288894b4130bc371a74d249d6a6eee6f7abe8ccea5c471a91240fe1 +hmac: 4fe412d8dad69f05a8b864120dd812fb19e9c4652016ed9ff704f4de8fee6d8a ...