Display Git Version in Angular UI via Build-Time Injection

This commit is contained in:
adityachandelgit
2025-04-15 23:44:34 -06:00
committed by Aditya Chandel
parent 29eb9d305d
commit 1c5ebea70f
5 changed files with 58 additions and 24 deletions
+3
View File
@@ -7,6 +7,9 @@ COPY ./booklore-ui/package.json ./booklore-ui/package-lock.json ./
RUN npm install --force
COPY ./booklore-ui /angular-app/
ARG UI_VERSION=development
RUN echo "export const version = '${UI_VERSION}';" > /angular-app/src/environments/version.ts
RUN npm run build --configuration=production
# Stage 2: Build the Spring Boot app with Gradle