update documentation for changing lockfiles; change script to support mac nanaive cp function
This commit is contained in:
parent
20e970d7f6
commit
948647a9dd
|
@ -209,12 +209,9 @@ in Bitcoin Core, with the following exceptions:
|
||||||
If your change requires a dependency to be upgraded you must do the following:
|
If your change requires a dependency to be upgraded you must do the following:
|
||||||
|
|
||||||
1. Modify `Cargo.toml`
|
1. Modify `Cargo.toml`
|
||||||
2. Copy `Cargo-minimal.lock` to `Cargo.lock`
|
2. Run `just update-lock-files`, if necessary install `just` first with `cargo install just`.
|
||||||
3. Trigger cargo to update the required entries in the lock file - use `--precise` using the minimum version number that works
|
3. Test your change
|
||||||
4. Test your change
|
4. Commit both `Cargo-minimal.lock` and `Cargo-recent.lock` together with `Cargo.toml` and your code changes
|
||||||
5. Copy `Cargo.lock` to `Cargo-minimal.lock`
|
|
||||||
6. Update `Cargo-recent.lock` if it is also behind
|
|
||||||
7. Commit both lock files together with `Cargo.toml` and your code changes
|
|
||||||
|
|
||||||
### Unsafe code
|
### Unsafe code
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
for file in Cargo-minimal.lock Cargo-recent.lock; do
|
for file in Cargo-minimal.lock Cargo-recent.lock; do
|
||||||
cp --force "$file" Cargo.lock
|
cp -f "$file" Cargo.lock
|
||||||
cargo check
|
cargo check
|
||||||
cp --force Cargo.lock "$file"
|
cp -f Cargo.lock "$file"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue