Report the Go build info version when linker flags set none (closes #422)
check / check (push) Successful in 10m44s
check / check (push) Successful in 10m44s
A binary from go install, the README's first command, reported itself as version dev, a development build, although Go had recorded the tag it was built from. When the linker flags leave the version, commit or commit date unset, they are now filled in from the Go build info, so such a binary reports its tag and counts as a release. Builds through make, script/docker and goreleaser are unchanged. Model: opus-5-5
This commit was merged in pull request #444.
This commit is contained in:
1 parent
cdcbe8adfd
commit
d6eed26482
6 files changed
+207
-21
No files matched your search
+2
-2
@@ -11,8 +11,8 @@
|
||||
# when no tag is reachable, each with a "-dirty" suffix when tracked
|
||||
# files have uncommitted changes. Untracked files are ignored: a stray
|
||||
# scratch file does not change what was compiled. Outside a git checkout
|
||||
# (release tarball, `go install`), or in one with no commits, it is
|
||||
# "dev".
|
||||
# (such as an unpacked release tarball), or in one with no commits, it
|
||||
# is "dev".
|
||||
#
|
||||
# Nothing here ever invents a version number.
|
||||
set -eu
|
||||
|
||||
Reference in new issue
Block a user