Skip to content

Commit

Permalink
Merge pull request #513 from teloxide/doc_fix
Browse files Browse the repository at this point in the history
Fix docs.rs build
  • Loading branch information
Hirrolot committed Feb 6, 2022
2 parents c8c0cdf + 675600b commit 283533b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"]

Expand Down
8 changes: 6 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 283533b

Please sign in to comment.