nixpkgs/pkgs/development/tools/rust/cargo-geiger/update-cargo-lock.sh
Evan Stoll 9234e42951 cargo-geiger: 0.9.0 -> 0.9.1
- add cargo-lock.patch
- add update-cargo-lock.sh
- update src owner and homepage to reflect new main repository
2020-01-29 21:48:58 -05:00

20 lines
488 B
Bash
Executable file

#!/bin/sh
# This updates cargo-lock.patch for the diesel 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 "cargo-geiger-$version" --depth=1 https://github.com/rust-secure-code/cargo-geiger "$checkout"
cd "$checkout"
rm -f rust-toolchain
cargo generate-lockfile
git add -f Cargo.lock
git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
cd "$here"
rm -rf "$checkout"