-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: ensure flake registry remains sorted
Additionally, ensure the latest contents of `flake-registry.json` are used when running `ci.sh`. Without `--tarball-ttl 0`, old contents can be reused across multiple runs. This shouldn't be an issue in CI, but it's helpful when running `ci.sh` manually, during development.
- Loading branch information
Showing
2 changed files
with
64 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
#!/usr/bin/env bash | ||
# Test that the flake-registry.json format is valid | ||
# Test that the flake-registry.json format is sorted & valid | ||
set -euo pipefail | ||
|
||
cd "$(dirname "$0")" | ||
|
||
# Ensure current flake-registry.json file is sorted. | ||
nix registry list --tarball-ttl 0 --flake-registry "$PWD/flake-registry.json" \ | ||
| grep -- '^global ' | LC_ALL=C sort -u -c | ||
|
||
nix run --flake-registry "$PWD/flake-registry.json" nixpkgs#hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters