Skip to content

Commit b8db747

Browse files
author
Arnavion
committed
Set up crates for self-hosted docs.
Fixes #57
1 parent ba1656b commit b8db747

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,20 @@ The repository supports the latest patch versions of each of the separate 1.x re
6363

6464
# To make a new crate release
6565

66-
1. `/k8s-openapi/Cargo.toml`: Update crate version
66+
1. `/Cargo.toml`: Update crate version
67+
1. `/Cargo.toml`: Update docs URL
6768
1. `/k8s-openapi-codegen-common/Cargo.toml`: Update crate version
6869
1. `/k8s-openapi-derive/Cargo.toml`: Update crate version
6970
1. `/k8s-openapi-derive/Cargo.toml`: Update version req of `k8s-openapi-codegen-common` dependency
71+
1. `/k8s-openapi-derive/Cargo.toml`: Update docs URL
72+
1. Generate docs (change feature and directory name as appropriate).
73+
74+
```sh
75+
rm -rf ./target/doc/ &&
76+
cargo rustdoc --features 'v1_16' -- -Z unstable-options --disable-per-crate-search --enable-index-page &&
77+
CARGO_TARGET_DIR="$(realpath ./target)" cargo rustdoc --manifest-path ./k8s-openapi-derive/Cargo.toml -- -Z unstable-options --disable-per-crate-search --enable-index-page &&
78+
rm -rf ../k8s-openapi-gh-pages/v0.6.x &&
79+
cp -R ./target/doc ../k8s-openapi-gh-pages/v0.6.x
80+
```
81+
82+
1. `../k8s-openapi-gh-pages/index.html`: Add new anchor if this is a new major release

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "Apache-2.0"
55
authors = ["Arnavion <[email protected]>"]
66
categories = ["api-bindings", "web-programming::http-client"]
77
description = "Bindings for the Kubernetes client API"
8-
documentation = "https://docs.rs/k8s-openapi"
8+
documentation = "https://arnavion.github.io/k8s-openapi/v0.6.x/k8s-openapi/"
99
edition = "2018"
1010
keywords = ["client", "kubernetes", "k8s", "http"]
1111
readme = "README.md"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This crate is a Rust Kubernetes API client. It contains bindings for the resourc
22

33
[crates.io](https://crates.io/crates/k8s-openapi)
44

5-
[Documentation](https://docs.rs/k8s-openapi)
5+
[Documentation](https://arnavion.github.io/k8s-openapi/)
66

77
[Changelog](https://github.com/Arnavion/k8s-openapi/blob/master/CHANGELOG.md)
88

k8s-openapi-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "Apache-2.0"
55
authors = ["Arnavion <[email protected]>"]
66
categories = ["api-bindings", "web-programming::http-client"]
77
description = "Custom derives for the Kubernetes client API"
8-
documentation = "https://docs.rs/k8s-openapi-derive"
8+
documentation = "https://arnavion.github.io/k8s-openapi/v0.6.x/k8s-openapi-derive/"
99
edition = "2018"
1010
keywords = ["client", "kubernetes", "k8s", "http"]
1111
readme = "README.md"

k8s-openapi-derive/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ See crate docs for details.
66

77
[crates.io](https://crates.io/crates/k8s-openapi-derive)
88

9-
[Documentation](https://docs.rs/k8s-openapi-derive)
9+
[Documentation](https://arnavion.github.io/k8s-openapi/)
1010

1111
[Changelog](https://github.com/Arnavion/k8s-openapi/blob/master/CHANGELOG.md)
1212

k8s-openapi-derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<T, E> ResultExt<T> for Result<T, E> where E: std::fmt::Display {
269269
///
270270
/// (You may wish to generate your own crate's docs, or run it through `cargo-expand`, to be able to see the macro expansion.)
271271
///
272-
/// Refer to [the `k8s-openapi` crate docs](https://docs.rs/k8s-openapi) to learn more about how to use the return values of these functions.
272+
/// Refer to [the `k8s-openapi` crate docs](https://arnavion.github.io/k8s-openapi/) to learn more about how to use the return values of these functions.
273273
///
274274
/// See the [`custom_resource_definition` test in the repository](https://github.com/Arnavion/k8s-openapi/blob/master/k8s-openapi-tests/src/custom_resource_definition.rs)
275275
/// for a full example of using this custom derive.

0 commit comments

Comments
 (0)