diff options
author | alaviss <leorize+oss@disroot.org> | 2020-06-14 04:22:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-14 11:22:55 +0200 |
commit | d749c8cd87508871dc28b528f57d26b1004007b3 (patch) | |
tree | bdc3652637d997d2ba4a8c19dbbeb643f2842e80 /compiler | |
parent | 4e3edf58360d1c4da79d50acdf5cf98b97ce585d (diff) | |
download | Nim-d749c8cd87508871dc28b528f57d26b1004007b3.tar.gz |
compiler/commands: make gitHash settable at compile-time. (#14654)
This is useful for building nightlies, since we will be building from a generated source archive and git metadata is lost there.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 2d8418139..c945a633a 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -98,7 +98,7 @@ proc writeVersionInfo(conf: ConfigRef; pass: TCmdLinePass) = CPU[conf.target.hostCPU].name, CompileDate]), {msgStdout}) - const gitHash = gorge("git log -n 1 --format=%H").strip + const gitHash {.strdefine.} = gorge("git log -n 1 --format=%H").strip when gitHash.len == 40: msgWriteln(conf, "git hash: " & gitHash, {msgStdout}) |