v0.1.3: Add VERSION to website build

This commit is contained in:
lotherk
2026-03-27 15:04:46 +00:00
parent b42801b6c5
commit 9133b90431
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
FROM alpine:latest AS version
COPY VERSION.txt /tmp/version.txt
FROM node:20-alpine AS builder FROM node:20-alpine AS builder
WORKDIR /app/www WORKDIR /app/www
@@ -8,6 +11,8 @@ COPY www/ ./
RUN node build-blog.js RUN node build-blog.js
FROM nginx:alpine FROM nginx:alpine
COPY --from=version /tmp/version.txt /tmp/version.txt
ENV VERSION=$(cat /tmp/version.txt)
COPY --from=builder /app/www/ /usr/share/nginx/html/ COPY --from=builder /app/www/ /usr/share/nginx/html/
COPY docker-entrypoint.d/ /docker-entrypoint.d/ COPY docker-entrypoint.d/ /docker-entrypoint.d/

View File

@@ -34,7 +34,7 @@
<a href="docs/" class="btn btn-secondary btn-large">Read Docs</a> <a href="docs/" class="btn btn-secondary btn-large">Read Docs</a>
</div> </div>
<div class="hero-meta"> <div class="hero-meta">
<span>v0.1.1</span> <span>v${VERSION}</span>
<span></span> <span></span>
<a href="${GIT_URL}" target="_blank">Git Repository</a> <a href="${GIT_URL}" target="_blank">Git Repository</a>
<span></span> <span></span>