From 7f816f50f75050a5ccf0faf30167a6353f7f3626 Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 5 Jun 2022 11:33:02 -0400 Subject: [PATCH] fix(dashboard): correctly set current git commit hash during build --- Dockerfile.dashboard | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile.dashboard b/Dockerfile.dashboard index 51bc1c09..8a048b69 100644 --- a/Dockerfile.dashboard +++ b/Dockerfile.dashboard @@ -3,12 +3,14 @@ FROM alpine:latest as builder RUN apk add nodejs-current yarn go git COPY dashboard/ /build +COPY .git/ /build/.git + WORKDIR /build RUN yarn install --frozen-lockfile RUN yarn build -RUN go build -ldflags "-X dashboard/main.version=$(git rev-parse HEAD)" +RUN sh -c 'go build -ldflags "-X main.version=$(git rev-parse HEAD)"' FROM alpine:latest