From 119462d720306930e76b69b2f2772e6f08cd1ce0 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 21 Apr 2022 16:28:54 +0200 Subject: 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 Autosubmit: tazjin --- tools/nixery/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tools/nixery') diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix index 6c0226f2fb..b5575be507 100644 --- a/tools/nixery/default.nix +++ b/tools/nixery/default.nix @@ -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. -- cgit 1.4.1