From f179fa2e1b9d436a6a37029f2b83db60b87ac300 Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 25 Sep 2024 12:36:48 +0800 Subject: [PATCH] Problem: released binary don't record commit hash (#1607) * Problem: ci build might update flake lock file Solution: - make it fail * don't allow dirty * fix rev --- flake.nix | 1 + scripts/release.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7649379adc..b5d6d9a164 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,7 @@ go = super.go_1_22; test-env = final.callPackage ./nix/testenv.nix { }; cronos-matrix = final.callPackage ./nix/cronos-matrix.nix { + inherit rev; bundle-exe = final.pkgsBuildBuild.callPackage nix-bundle-exe { }; }; testground-image = final.callPackage ./nix/testground-image.nix { }; diff --git a/scripts/release.sh b/scripts/release.sh index 68f35ab61d..3be3b5a07c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -28,7 +28,7 @@ build() { fi fi echo "building $FLAKE" - nix build -L "$FLAKE" + nix build --no-update-lock-file --no-allow-dirty -L "$FLAKE" cp result "cronos_${ref_name_clean:1}${network}_${name}.tar.gz" }