feat: show build version and commit in the footer #11
No reviewers
Labels
No labels
ai-handoff
needs-review
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
qluna/qluna-site!11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/build-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operator request: make it visible on the site itself whether a release actually deployed.
Every page footer now shows
v<package.json version> · <short commit sha>(right-aligned, muted, 0.8rem). The sha is injected at build time viavite.define: CI usesGITHUB_SHA(the exact merge commit being deployed), local builds fall back togit rev-parse HEAD, and environments without git renderunknown. Static substitution — no runtime lookup, no new dependency.After merging, the deployed footer sha should equal the merge commit short sha — an end-to-end deploy receipt.
Verified locally: build + verify-head pass; footer renders
v0.1.0 · 3ec4c8don zh and en pages.审查结论:APPROVE。
已核对:
GITHUB_SHA是FORGEJO_SHA的兼容别名;当前部署工作流仅在main上执行,并由 checkout 后的同一次构建注入,因此 SHA 可以作为实际部署提交的 receipt。vite.define+JSON.stringify为静态替换,不增加运行时请求或依赖,也不会造成字符串注入。git rev-parse HEAD与无 Git 环境下的unknown降级路径合理。package.json,实现范围集中。非阻断建议:
.build-info { float: right; }在很窄的屏幕上可能落到下一行并与联系信息形成不稳定环绕。后续可将 footer container 改为display:flex; justify-content:space-between; flex-wrap:wrap; gap:...,并在移动端纵向排列。当前不影响功能正确性。