Skip to content

Instantly share code, notes, and snippets.

@rainux
Last active July 6, 2019 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rainux/035434d401ab0eb95268a6ebae99c883 to your computer and use it in GitHub Desktop.
Save rainux/035434d401ab0eb95268a6ebae99c883 to your computer and use it in GitHub Desktop.
#!/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