From d59f4bc42e9aae6c5a00017a1d09e391667d872d Mon Sep 17 00:00:00 2001 From: Marcus Weiner Date: Thu, 10 Dec 2020 18:38:48 +0100 Subject: [PATCH] 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 --- netlify.toml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/netlify.toml b/netlify.toml index f1a88e494b..10a933adbd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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 = "/"