fix(nixery): Avoid impure reading of .git directory
Change-Id: I67405f9c9bd9cc8cb34fafff80e30b2fca53a2b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5502 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
c05c4995ab
commit
119462d720
1 changed files with 3 additions and 5 deletions
|
@ -21,11 +21,9 @@ with pkgs;
|
|||
let
|
||||
inherit (pkgs) buildGoModule;
|
||||
|
||||
# Current Nixery commit - this is used as the Nixery version in
|
||||
# builds to distinguish errors between deployed versions, see
|
||||
# server/logs.go for details.
|
||||
gitDir = if builtins.pathExists ./.git then ./.git else ../../.git;
|
||||
nixery-commit-hash = args.commitHash or pkgs.lib.commitIdFromGitRepo gitDir;
|
||||
# Avoid extracting this from git until we have a way to plumb
|
||||
# through revision numbers.
|
||||
nixery-commit-hash = "depot";
|
||||
|
||||
# Go implementation of the Nixery server which implements the
|
||||
# container registry interface.
|
||||
|
|
Loading…
Reference in a new issue