chore: fix netlify build (#1131)

## Motivation

At Netlify we recently introduced native Rust support in the build
system: https://github.com/netlify/build-image/pull/477

## Solution

This PR cleans up the Netlify build config to use a more
straight-forward way of building rust docs.

This also introduces a workaround for
https://github.com/netlify/build-image/issues/505

## Kudos

We're big fans of the `tracing` crate at Netlify and using it for many
new systems recently. Very happy we can give something back!

Closes #1130
This commit is contained in:
Marcus Weiner 2020-12-10 18:38:48 +01:00 committed by Eliza Weisman
parent fc3eb9f0d0
commit 199aa1a4c6

View File

@ -1,10 +1,7 @@
[build]
command = """
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly --profile minimal \
&& source $HOME/.cargo/env \
&& RUSTDOCFLAGS=\"--cfg docsrs\" cargo +nightly doc --no-deps
"""
publish = "target/doc"
command = "rustup install nightly --profile minimal && cargo doc --no-deps && cp -r target/doc _netlify_out"
environment = { RUSTDOCFLAGS= "--cfg docsrs" }
publish = "_netlify_out"
[[redirects]]
from = "/"