mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 11:36:10 +01:00
add script to update nar hashes in tests
This commit is contained in:
parent
1ead2d05dd
commit
72cdb22463
1 changed files with 16 additions and 0 deletions
16
scripts/update-tests-hash
Executable file
16
scripts/update-tests-hash
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
# Helper script to update the tests flake hash
|
||||
set -euo pipefail
|
||||
|
||||
# Go to the root of the repository
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "Updating tests.narHash..." >&2
|
||||
|
||||
# Update the flake lock file
|
||||
nix --extra-experimental-features 'flakes nix-command' flake lock ./tests
|
||||
|
||||
# Generate the hash
|
||||
nix --extra-experimental-features 'flakes nix-command' hash path ./tests > ./tests.narHash
|
||||
|
||||
echo "Hash updated successfully: $(cat tests.narHash)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue