include main.Version in binaries

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2023-06-09 11:52:03 +03:00
parent 655c7fb807
commit d4b5d5df79
14 changed files with 32 additions and 0 deletions

View File

@@ -7,6 +7,9 @@ RUN LDFLAGS=-static CFLAGS=-Werror make usermode-helper
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin
ARG GOPKGVERSION
ENV ldflags="-X main.Version=$GOPKGVERSION"
# Hack to work around an issue with go on arm64 requiring gcc
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true