Skip to content

Commit

Permalink
Support --all-features for docs.rs (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored May 28, 2024
1 parent 3d5affe commit bde28b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package_publish() { _package_raw publish; }
package_include() { _package_raw include; }
package_exclude() { _package_raw exclude; }
package_features() { sed -n '/^\[features]$/,/^$/{s/ = .*$//p}' Cargo.toml; }
package_doc_all_features() { _package_doc_raw all-features; }
package_doc_features() { _package_doc_raw features; }
package_doc_targets() { _package_doc_raw targets; }
package_doc_default_target() { _package_doc_raw default-target | tr -d '"'; }
Expand Down
1 change: 1 addition & 0 deletions scripts/test-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ test_helper() {
if [ -e src/lib.rs -a "$(package_publish)" = true ]; then
features=$(package_doc_features | tr -d '[]" ')
[ -n "$features" ] && features="--features=$features"
[ "$(package_doc_all_features)" = true ] && features=--all-features
target="$(package_doc_default_target)"
[ -z "$(package_doc_targets)" ] || e 'docs.rs targets unsupported'
[ -n "$target" ] && target="--target=$target"
Expand Down

0 comments on commit bde28b9

Please sign in to comment.