Merge rust-bitcoin/rust-bitcoin#3765: contrib: check if the user has cargo-public-api
f01f071751
api: document the need of cargo nightly (Jose Storopoli)ff67eadc7f
contributing: clarify API changes (Jose Storopoli)04852958b9
contrib: check if the user has cargo-public-api (Jose Storopoli) Pull request description: Closes #3764. yancyribbens can you test it locally? It works in my end both with and without `cargo-public-api`. Of course without gives the error message that I was supposed to see. EDIT: You can run it with `just check-api`. ACKs for top commit: apoelstra: ACK f01f071751332bb6aa8b9affa4677f913035de7f; successfully ran local tests tcharding: ACKf01f071751
Tree-SHA512: 7acf8332731191de47afc02e24c151bc53c1f38685217eccbea1b64c216674f31729ba703e132765cba67183dff95757aa949d653c5cbe538240371c2db52c14
This commit is contained in:
commit
d2c9fab460
|
@ -157,6 +157,9 @@ running `just check-api`.
|
||||||
- `primitives`
|
- `primitives`
|
||||||
- `units`
|
- `units`
|
||||||
|
|
||||||
|
Check the [API text files](api/README.md) for more information
|
||||||
|
on how to install the dependencies and create the text files.
|
||||||
|
|
||||||
### Repository maintainers
|
### Repository maintainers
|
||||||
|
|
||||||
Pull request merge requirements:
|
Pull request merge requirements:
|
||||||
|
|
|
@ -6,7 +6,7 @@ enabled. To create these files run `../contrib/check-for-api-changes.sh`:
|
||||||
Requires `cargo-public-api`, install with:
|
Requires `cargo-public-api`, install with:
|
||||||
|
|
||||||
```
|
```
|
||||||
cargo +stable install cargo-public-api --locked
|
cargo +nightly install cargo-public-api --locked
|
||||||
```
|
```
|
||||||
|
|
||||||
ref: https://github.com/enselic/cargo-public-api
|
ref: https://github.com/enselic/cargo-public-api
|
||||||
|
|
|
@ -22,6 +22,7 @@ export LC_ALL=C
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
need_nightly
|
need_nightly
|
||||||
|
need_cargo_public_api
|
||||||
|
|
||||||
generate_api_files "hashes"
|
generate_api_files "hashes"
|
||||||
generate_api_files "io"
|
generate_api_files "io"
|
||||||
|
@ -81,6 +82,13 @@ need_nightly() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
need_cargo_public_api() {
|
||||||
|
if command -v cargo-public-api > /dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
err "cargo-public-api is not installed; please run 'cargo +nightly install cargo-public-api --locked'"
|
||||||
|
}
|
||||||
|
|
||||||
err() {
|
err() {
|
||||||
echo "$1" >&2
|
echo "$1" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue