Show actual version in topbar instead of hardcoded beta (Fixes #93)
CI / test (pull_request) Successful in 26s
CI / docker (pull_request) Skipped

This commit is contained in:
agent
2026-09-09 18:27:57 -05:00
parent 8ecf5338d5
commit 65ed0c7043
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -55,6 +55,7 @@ jobs:
with:
context: .
push: true
build-args: VERSION=${{ gitea.ref_name }}
tags: |
git.archfox.org/poslop/palette:${{ gitea.ref_name }}
${{ startsWith(gitea.ref, 'refs/tags/') && 'git.archfox.org/poslop/palette:latest' || '' }}
+2 -1
View File
@@ -9,7 +9,8 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /palette ./cmd/palette
ARG VERSION=dev
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X palette/internal/web.Version=${VERSION}" -o /palette ./cmd/palette
# ---- runtime stage ----
FROM alpine:3.20
+1 -1
View File
@@ -13,7 +13,7 @@
{{define "topbar"}}
<div class="topbar">
<a class="logo" href="/history">Palette <em>/ beta</em></a>
<a class="logo" href="/history">Palette <em>/ {{ version }}</em></a>
<nav>
<a href="/new" {{if eq .Page "new"}}class="on"{{end}}>New</a>
<a href="/history" {{if eq .Page "history"}}class="on"{{end}}>Public</a>