Skip to content

Commit

Permalink
chore: fix netlify build (#1131)
Browse files Browse the repository at this point in the history
## Motivation

At Netlify we recently introduced native Rust support in the build
system: netlify/build-image#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
netlify/build-image#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
  • Loading branch information
mraerino authored and hawkw committed Dec 14, 2020
1 parent fc3eb9f commit 199aa1a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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 = "/"
Expand Down

0 comments on commit 199aa1a

Please sign in to comment.