We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 652119f commit 8f241c7Copy full SHA for 8f241c7
.gitattributes
@@ -0,0 +1 @@
1
+VERSION export-subst
Dockerfile
@@ -5,7 +5,14 @@ COPY .npmrc ./
5
COPY package.json package-lock.json ./
6
RUN npm install && npm cache clean --force
7
COPY . .
8
-RUN npm run build
+RUN \
9
+ if [ -d .git ]; then \
10
+ export SOURCE_VERSION=$(git rev-parse --short HEAD); \
11
+ else \
12
+ export SOURCE_VERSION=$(head -n 1 VERSION); \
13
+ fi && \
14
+ echo "SOURCE_VERSION: $SOURCE_VERSION" && \
15
+ npm run build
16
17
18
FROM node:18-alpine AS runtime
VERSION
@@ -0,0 +1,4 @@
+$Format:%h$
2
+commit: $Format:%H$
3
+date: $Format:%cI$
4
+refs: $Format:%d$
0 commit comments