Skip to content

Commit 7607b0a

Browse files
committed
update-lock-files with all or specific features
Change update-lock-file script so that there are now two cases: - first are all the crates that can be build with --all-features, - second is the list of crates that cannot and are instead built only with the specified features. node and integration_test are build with the "latest" feature only.
1 parent c2298f1 commit 7607b0a

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

contrib/update-lock-files.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,27 @@
44

55
set -euo pipefail
66

7+
REPO_DIR="$(git rev-parse --show-toplevel)"
8+
9+
# Targets where `--all-features` is used.
10+
ALL_FEATURE_CRATES=(bitreq client fuzz jsonrpc types verify)
11+
12+
# Targets with conflicting features and only speficic features are used.
13+
SPECIFIC_FEATURES_CRATES=(integration_test node)
14+
SPECIFIC_FEATURES=(latest)
15+
16+
update_lock_files() {
17+
for crate in "${ALL_FEATURE_CRATES[@]}"; do
18+
cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-features
19+
done
20+
21+
for crate in "${SPECIFIC_FEATURES_CRATES[@]}"; do
22+
cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --no-default-features --features="${SPECIFIC_FEATURES[*]}"
23+
done
24+
}
25+
726
for file in Cargo-minimal.lock Cargo-recent.lock; do
827
cp --force "$file" Cargo.lock
9-
cargo check --all-features
28+
update_lock_files
1029
cp --force Cargo.lock "$file"
1130
done

0 commit comments

Comments
 (0)