diff options
author | Son Ho | 2024-06-04 13:52:44 +0200 |
---|---|---|
committer | Son Ho | 2024-06-04 13:52:44 +0200 |
commit | 3ad6c4712fd41efec55f29af5ccc31f68a0e12cf (patch) | |
tree | 89f3b6999e1697595f1c3fbb2d9c4d8c60a69e49 /scripts/update-charon-pin.sh | |
parent | 2a7a18d6a07ea4967ba9ec0763e6b7d04849dc7e (diff) | |
parent | 4a31acdff7a5dfdc26bf25ad25bb8266b790f891 (diff) |
Merge branch 'main' into son/loops2
Diffstat (limited to 'scripts/update-charon-pin.sh')
-rwxr-xr-x | scripts/update-charon-pin.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/update-charon-pin.sh b/scripts/update-charon-pin.sh index 418602b8..1fa706ae 100755 --- a/scripts/update-charon-pin.sh +++ b/scripts/update-charon-pin.sh @@ -1,7 +1,18 @@ #!/usr/bin/env bash if ! which jq 2> /dev/null 1>&2; then - echo 'Error: command `jq` not found.' + echo 'Error: command `jq` not found; please install it.' exit 1 fi + +if [ -L charon ]; then + echo '`./charon` is a symlink; we using the commit there for our new pin.' + COMMIT="$(git -C charon rev-parse HEAD)" + nix flake lock --override-input charon "github:aeneasverif/charon/$COMMIT" +else + echo 'Pinning the latest commit from Charon `main`' + nix flake lock --update-input charon +fi + +# Keep the commit revision in `./charon-pin` as well so that non-nix users can know which commit to use. echo '# This is the commit from https://github.com/AeneasVerif/charon that should be used with this version of aeneas.' > ./charon-pin jq -r .nodes.charon.locked.rev flake.lock >> ./charon-pin |