Commit Graph
2 Commits
Author SHA1 Message Date
Brad Fitzpatrick d80811b882 version/mkversion: don't use os.DevNull for git config in tests
Git for Windows 2.56.0 rejects GIT_CONFIG_GLOBAL=NUL with "unable to
access 'NUL': Invalid argument" (git-for-windows/git#6449), breaking
TestInfoFromEnvMatchesGit and TestInfoFromEnvPrecedence on Windows
runners with the new git. Point them at an empty file instead.

Updates git-for-windows/git#6449

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: If2b9b6d29344b9280771e507d7d7e6c06f7ab9b0
2026-10-09 08:10:57 -07:00
Brad Fitzpatrick 70422c917a version/mkversion: allow supplying the complete version via env vars
mkversion derives the version from git history, which a shallow clone
lacks (the change count silently comes out as 0) and a tree without
.git can't provide at all. If TS_VERSION_LONG is set, InfoFrom now
takes the version from it plus TS_VERSION_GIT_HASH (and the EXTRA/DATE
variants), runs no git, and derives everything else through the same
mkOutput as the git path. The result's Long must reproduce the input
exactly or InfoFrom errors.

Updates tailscale/corp#44945

Change-Id: I9c1247ea5d1c6c52c823c2205447b5c7ee8e778c
Signed-off-by: Brad Fitzpatrick <[email protected]>
2026-09-29 15:42:05 -07:00