Add script to update-lock-files

Copy the script from `rust-bitcoin`, also add a `just` command to call
it.
This commit is contained in:
Tobin C. Harding 2024-03-27 11:15:35 +11:00
parent c61db1b44f
commit 65d54e7bbe
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 16 additions and 1 deletions

11
contrib/update-lock-files.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
#
# Update the minimal/recent lock file
set -euo pipefail
for file in Cargo-minimal.lock Cargo-recent.lock; do
cp --force "$file" Cargo.lock
cargo check
cp --force Cargo.lock "$file"
done

View File

@ -31,4 +31,8 @@ sane: lint
# Check for API changes. # Check for API changes.
check-api: check-api:
./contrib/check-for-api-changes.sh ./contrib/check-for-api-changes.sh
# Update the lock files.
update-lock-files:
./contrib/update-lock-files.sh