From 189af88bc8e5d306c384bd2c38c840aa9fcb05e0 Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sun, 8 Sep 2024 20:34:26 +0100 Subject: [PATCH] chore: omit debug information release builds (#185) --- .goreleaser.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 110157a..630172c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -13,7 +13,7 @@ builds: flags: - '-trimpath' ldflags: - - '-X github.com/hacdias/webdav/v5/cmd.version={{.Version}}' + - '-s -w -X github.com/hacdias/webdav/v5/cmd.version={{.Version}}' goos: - darwin - linux diff --git a/Dockerfile b/Dockerfile index 368ac85..74cf207 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ COPY ./go.sum ./ RUN go mod download COPY . /webdav/ -RUN go build -o main -ldflags="-X 'github.com/hacdias/webdav/v5/cmd.version=$VERSION'" . +RUN go build -o main -trimpath -ldflags="-s -w -X 'github.com/hacdias/webdav/v5/cmd.version=$VERSION'" . FROM scratch