feat: print git commit during startup
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
FROM golang:1.24.7 AS build
|
||||
ARG GIT_COMMIT=unknown
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build -trimpath -ldflags="-s -w" \
|
||||
go build -trimpath -ldflags="-s -w -X main.commit=${GIT_COMMIT}" \
|
||||
-o /out/server ./server/cmd/marka-server
|
||||
|
||||
FROM scratch
|
||||
|
||||
Reference in New Issue
Block a user