From 675600bf74ad5f0a32f1d36257da5ae640f1ef19 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 6 Feb 2022 17:23:21 +0300 Subject: [PATCH] Fix docs.rs build --- CHANGELOG.md | 6 ++++++ Cargo.toml | 5 +++-- netlify.toml | 8 ++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66608541..60f13485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 82a11fa9..8bb19f13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/netlify.toml b/netlify.toml index 21b40399..52a1ad44 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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"