diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/tools/security/b3sum/update-cargo-lock.sh | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/security/b3sum/update-cargo-lock.sh')
-rwxr-xr-x | infra/libkookie/nixpkgs/pkgs/tools/security/b3sum/update-cargo-lock.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/b3sum/update-cargo-lock.sh b/infra/libkookie/nixpkgs/pkgs/tools/security/b3sum/update-cargo-lock.sh new file mode 100755 index 000000000000..8c52ad5cf6c0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/tools/security/b3sum/update-cargo-lock.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# This updates cargo-lock.patch for the b3sum version listed in default.nix. + +set -eu -o verbose + +here=$PWD +version=$(cat default.nix | grep '^ version = "' | cut -d '"' -f 2) +checkout=$(mktemp -d) +git clone -b "$version" --depth=1 https://github.com/BLAKE3-team/BLAKE3 "$checkout" +cd "$checkout" + +(cd b3sum && cargo generate-lockfile) +mv b3sum/Cargo.lock ./ +git add -f Cargo.lock +git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch + +cd "$here" +rm -rf "$checkout" |