Show actual version in topbar instead of hardcoded beta (Fixes #93)
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user