Skip to content

Commit 1914292

Browse files
committed
chore: fix build version in binary
1 parent 4b09928 commit 1914292

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile.build

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@ ARG VERSION
4040
WORKDIR /src
4141
ENV CGO_ENABLED=1 PKG_CONFIG_PATH="/build/vcpkg_installed/$TRIPLET/lib/pkgconfig" CC="$GOCC" \
4242
GOARCH="$GOARCH" GOAMD64="$GOAMD64" GOARM="$GOARM" \
43-
GOCACHE=/src/.gocache/go-build GOMODCACHE=/src/.gocache/mod
44-
CMD ["go", "build", "-o", "./go-librespot", "-a", "-ldflags", "-s -w -X github.com/devgianlu/go-librespot.version=$VERSION", "./cmd/daemon"]
43+
GOCACHE=/src/.gocache/go-build GOMODCACHE=/src/.gocache/mod \
44+
VERSION="$VERSION"
45+
46+
CMD [ "/bin/sh", "-c", "go build -o ./go-librespot -a -ldflags \"-s -w -X github.com/devgianlu/go-librespot.version=$VERSION\" ./cmd/daemon" ]

0 commit comments

Comments
 (0)