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 ## unreleased
## 0.6.1 - 2022-02-06
### Fixed
- docs.rs documentation build
## 0.6.0 - 2022-02-06 ## 0.6.0 - 2022-02-06
### Added ### Added

View file

@ -1,6 +1,6 @@
[package] [package]
name = "teloxide" name = "teloxide"
version = "0.6.0" version = "0.6.1"
edition = "2018" edition = "2018"
description = "An elegant Telegram bots framework for Rust" description = "An elegant Telegram bots framework for Rust"
repository = "https://github.com/teloxide/teloxide" repository = "https://github.com/teloxide/teloxide"
@ -108,7 +108,8 @@ chrono = "0.4"
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true 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"] rustc-args = ["--cfg", "dep_docsrs"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"] cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]

View file

@ -1,8 +1,12 @@
[build] [build]
command = "rustup install nightly --profile minimal && cargo +nightly doc --all-features --no-deps && cp -r target/doc _netlify_out" 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"
environment = { RUSTFLAGS="--cfg dep_docsrs", RUSTDOCFLAGS= "--cfg docsrs -Znormalize-docs" }
publish = "_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]] [[redirects]]
from = "/" from = "/"
to = "/teloxide" to = "/teloxide"