Fix docs.rs build

This commit is contained in:
Maybe Waffle 2022-02-06 17:23:21 +03:00
parent c8c0cdf218
commit 675600bf74
3 changed files with 15 additions and 4 deletions

View file

@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased
## 0.6.1 - 2022-02-06
### Fixed
- docs.rs documentation build
## 0.6.0 - 2022-02-06
### Added

View file

@ -1,6 +1,6 @@
[package]
name = "teloxide"
version = "0.6.0"
version = "0.6.1"
edition = "2018"
description = "An elegant Telegram bots framework for Rust"
repository = "https://github.com/teloxide/teloxide"
@ -108,7 +108,8 @@ chrono = "0.4"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs", "-Znormalize-docs"]
# FIXME: Add back "-Znormalize-docs" when https://github.com/rust-lang/rust/issues/93703 is fixed
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "dep_docsrs"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]

View file

@ -1,8 +1,12 @@
[build]
command = "rustup install nightly --profile minimal && cargo +nightly doc --all-features --no-deps && cp -r target/doc _netlify_out"
environment = { RUSTFLAGS="--cfg dep_docsrs", RUSTDOCFLAGS= "--cfg docsrs -Znormalize-docs" }
command = "rustup install nightly --profile minimal && cargo +nightly doc --all-features --no-deps -Zunstable-options -Zrustdoc-scrape-examples=examples && cp -r target/doc _netlify_out"
publish = "_netlify_out"
[build.environment]
RUSTFLAGS="--cfg dep_docsrs"
# FIXME: Add back "-Znormalize-docs" when https://github.com/rust-lang/rust/issues/93703 is fixed
RUSTDOCFLAGS= "--cfg docsrs"
[[redirects]]
from = "/"
to = "/teloxide"