diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-05-28 20:34:02 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-05-29 10:10:36 +0200 |
commit | 0f840483c731f48983832f7f627909f8463f05f3 (patch) | |
tree | 1f233b2deb5a50e2d03a5b6f8873e1dd3e588601 /tests | |
parent | 479757dc15c2f2020a81e0a94b58e33a89b0a14b (diff) |
Add date of last commit to SourceInfo
This is primarily useful for version string generation, where we need
a monotonically increasing number. The revcount is the preferred thing
to use, but isn't available for GitHub flakes (since it requires
fetching the entire history). The last commit timestamp OTOH can be
extracted from GitHub tarballs.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/flakes.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh index 6081e8939..d95d34c76 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -124,6 +124,7 @@ nix flake info --flake-registry $registry $flake1Dir | grep -q 'ID: *flake1' json=$(nix flake info --flake-registry $registry flake1 --json | jq .) [[ $(echo "$json" | jq -r .description) = 'Bla bla' ]] [[ -d $(echo "$json" | jq -r .path) ]] +[[ $(echo "$json" | jq -r .lastModified) = $(git -C $flake1Dir log -n1 --format=%ct) ]] # Test 'nix build' on a flake. nix build -o $TEST_ROOT/result --flake-registry $registry flake1:foo |