Last active
July 6, 2019 07:43
-
-
Save rainux/035434d401ab0eb95268a6ebae99c883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Build docs for current package and all explicit dependencies | |
package=$(basename $(pwd)) | |
if [[ -z $1 ]] | |
then | |
packages=$(cargo metadata --format-version 1 | jq -r " .packages | .[] | select(.name == \"$package\") | .dependencies | map(.name) | join(\" \")") | |
else | |
packages=$1 | |
fi | |
echo Building docs for packages: $packages | |
for p in $packages $package | |
do | |
cargo rustdoc -p $p --release | |
done | |
open target/doc/settings.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment