Create app-version.json if it doesn't exist during Docker build
This commit is contained in:
parent
87cc5d90fe
commit
55cd970173
1 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,9 @@ COPY . .
|
|||
RUN --mount=type=cache,target=/root/.pub-cache \
|
||||
flutter build web --release
|
||||
|
||||
# Create app-version.json if it doesnt exist
|
||||
RUN test -f app-version.json || echo '{"version":"__BUILD_PUBLISHED_AT__"}' > app-version.json
|
||||
|
||||
# Stage 2: Serve with nginx
|
||||
FROM nginx:alpine
|
||||
ARG PUBLISHED_AT
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue