Report the Go build info version when linker flags set none (closes #422)
check / check (push) Failing after 15m4s
check / check (push) Failing after 15m4s
A `go install` of a tag sets no linker flags, so the binary reported `dev`. Version, commit and commit date that the linker flags leave unset now come from the build info Go records. Go records a pseudo-version for an untagged commit and a `+dirty` suffix for a modified checkout; `IsDevVersion` now counts both as development builds, using `golang.org/x/mod`. Model: opus-5-5
This commit is contained in:
1 parent
88a2aa7953
commit
0cf0d5c44e
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