From 77158a569a94404767e066cb5f90e750a672406b Mon Sep 17 00:00:00 2001 From: Thilo Billerbeck Date: Tue, 19 Nov 2024 04:02:58 +0100 Subject: [PATCH] ci: watch for build arg tag since it carries most recent release in ci --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ebc3718..45eae1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,16 @@ FROM node:20 AS base +ARG GIT_TAG ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable COPY . /app WORKDIR /app -RUN echo "$(git rev-parse --short HEAD) ($(git describe --tags --abbrev=0))" > .git-rev +RUN if [ -n "$GIT_TAG" ]; then \ + VERSION="$GIT_TAG ($(git rev-parse --short HEAD))"; \ + else \ + VERSION="$(git describe --tags --abbrev=0) ($(git rev-parse --short HEAD))"; \ + fi && \ + echo $VERSION > .git-rev RUN rm -rf .git FROM base AS prod-deps