Skip to content

Commit

Permalink
Fix docs.rs build for non-root crate + minor release tweaks (kube-rs#683
Browse files Browse the repository at this point in the history
)

* set k8s-openapi feature for all creatse in docs.rs builds

fixes docs.rs builds for non-root crates

Signed-off-by: clux <[email protected]>

* minor notes about release

cargo release had a bug fix in 0.18.3 that i raised

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux authored Oct 27, 2021
1 parent ba2efe4 commit 16c4bf2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Select a version of `kube` along with the generated [k8s-openapi](https://github

```toml
[dependencies]
kube = "0.63.1"
kube = { version = "0.63.1", features = ["runtime","derive"] }
k8s-openapi = { version = "0.13.1", default-features = false, features = ["v1_22"] }
```

Expand Down
2 changes: 1 addition & 1 deletion kube-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deprecated-crd-v1beta1 = ["kube-core/deprecated-crd-v1beta1"]
__non_core = ["tracing", "serde_yaml", "base64"]

[package.metadata.docs.rs]
features = ["client", "native-tls", "rustls-tls", "ws", "oauth", "jsonpatch", "admission"]
features = ["client", "native-tls", "rustls-tls", "ws", "oauth", "jsonpatch", "admission", "k8s-openapi/v1_22"]
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
rustdoc-args = ["--cfg", "docsrs"]

Expand Down
4 changes: 4 additions & 0 deletions kube-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ license = "Apache-2.0"
repository = "https://github.com/kube-rs/kube-rs"
readme = "../README.md"

[package.metadata.docs.rs]
features = ["ws", "admission", "jsonpatch", "k8s-openapi/v1_22"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
ws = []
admission = ["json-patch"]
Expand Down
6 changes: 6 additions & 0 deletions kube-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ authors = [
]
license = "Apache-2.0"
repository = "https://github.com/kube-rs/kube-rs"
readme = "../README.md"
keywords = ["kubernetes", "runtime", "reflector", "watcher", "controller"]
categories = ["web-programming::http-client"]
rust-version = "1.56"
edition = "2021"

[package.metadata.docs.rs]
features = ["k8s-openapi/v1_22"]
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
futures = "0.3.17"
kube-client = { path = "../kube-client", version = "^0.63.0", default-features = false, features = ["jsonpatch", "client"] }
Expand Down
5 changes: 3 additions & 2 deletions release.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Release process :: cargo-release @ 0.18.0
# Release process :: cargo-release >= 0.18.3
#
# Dependencies: cargo-release, cargo-tree, sd, ripgrep
#
# 0. (optional) cargo release minor ; verify readme + changelog bumped; then git reset --hard
# 1. PUBLISH_GRACE_SLEEP=20 cargo release minor --execute
Expand All @@ -9,7 +11,6 @@

# Reference
# https://github.com/sunng87/cargo-release/blob/master/docs/reference.md
# Dependencies in hooks; cargo-release, cargo-tree, sd, ripgrep

consolidate-commits = true
shared-version = true
Expand Down
1 change: 1 addition & 0 deletions scripts/release-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ sanity() {
echo "prerelease: abort: recommending k8s-openapi pinned to a different version to what we use"
exit 1
fi
# TODO: verify versions of tools for release?
}

main() {
Expand Down

0 comments on commit 16c4bf2

Please sign in to comment.