Skip to content

Commit 72cdb22

Browse files
committed
add script to update nar hashes in tests
1 parent 1ead2d0 commit 72cdb22

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/update-tests-hash

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# Helper script to update the tests flake hash
3+
set -euo pipefail
4+
5+
# Go to the root of the repository
6+
cd "$(dirname "$0")/.."
7+
8+
echo "Updating tests.narHash..." >&2
9+
10+
# Update the flake lock file
11+
nix --extra-experimental-features 'flakes nix-command' flake lock ./tests
12+
13+
# Generate the hash
14+
nix --extra-experimental-features 'flakes nix-command' hash path ./tests > ./tests.narHash
15+
16+
echo "Hash updated successfully: $(cat tests.narHash)"

0 commit comments

Comments
 (0)