mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6223] [MERGED] ci(release): stamp released binaries with their source revision #6185
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6185
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6223
Author: @n0ctal
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/18/2026
Merged by: @MHSanaei
Base:
main← Head:upstream-stamp-release-revision📝 Commits (2)
32b9768ci(release): stamp released binaries with their source revisione5f2f5cci(release): give the Windows job the git it needs to stamp📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
.github/workflows/release.yml(+3 -2)📄 Description
Summary
The release workflow builds
main.go. Go treats a file argument as a file list, records the package path ascommand-line-arguments, and skips VCS stamping entirely — so published binaries carry no revision.Building the package instead (
.) with-buildvcs=trueproduces the same binary and addsvcs.revision/vcs.time.Why
Right now there is no way to map a released binary back to a commit. When a user reports a bug against "the latest release", the version string is all there is, and it does not distinguish rebuilds or tag moves.
go version -mis the standard place to look and it currently answers nothing:Scope
Two lines in
.github/workflows/release.yml— the Linux and the Windows build step. Themainpackage contains onlymain.go, so the compiled output is unchanged; only the build target notation and the flag differ.Validation
From a clean clone at the same commit, built both ways:
vcs.revisionmain.go(current).(this change)4b0e9f9b6032fa9f4ddd144f6f042ab73792d371Also confirmed
vcs.modified=falseunder release conditions — the frontend bundle lands in the gitignoredinternal/web/dist/, so the tree stays clean and the stamp is trustworthy rather than permanently marked dirty.Risk
Low. No flag that affects code generation changes, and
-buildvcs=truecannot fail the build here: the release job checks out a git repository, which is the only condition it requires.Worth knowing: this does not extend to the Docker image, since
.dockerignoreexcludes.gitand Go silently omits the stamp outside a repository. Making container builds traceable is a separate change and is deliberately not attempted here.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.