Try setting up docs.rs capable build

This commit is contained in:
Felix Krull 2018-10-17 22:17:07 +02:00 committed by Colin Walters
parent 250a2e8a4f
commit 423caf33d2
4 changed files with 14 additions and 4 deletions

View File

@ -42,7 +42,7 @@ libostree_nightly:
pages:
stage: doc
script:
- cargo doc --verbose --all-features
- cargo doc --verbose --features dox
- cp -r target/doc public
artifacts:
paths:

View File

@ -39,14 +39,17 @@ v2018_7 = ["v2018_6"]
name = "libostree_sys"
[package]
authors = ["Felix Krull <f_krull@gmx.de>"]
authors = ["Felix Krull"]
build = "build.rs"
categories = ["external-ffi-bindings"]
description = "FFI bindings to libostree-1"
documentation = "https://fkrull.gitlab.io/rust-libostree/libostree_sys"
keywords = ["ffi", "ostree", "libostree"]
license = "MIT"
links = "ostree"
links = "ostree-1"
name = "libostree-sys"
repository = "https://gitlab.com/fkrull/rust-libostree"
version = "0.1.2"
version = "0.1.3"
[package.metadata.docs.rs]
features = ["dox"]

View File

@ -62,6 +62,10 @@ fn find() -> Result<(), Error> {
return Ok(())
}
if cfg!(feature = "dox") {
return Ok(())
}
let target = env::var("TARGET").expect("TARGET environment variable doesn't exist");
let hardcode_shared_libs = target.contains("windows");

View File

@ -4,6 +4,9 @@ version = "0.1.0"
documentation = "https://fkrull.gitlab.io/rust-libostree/libostree"
[package.metadata.docs.rs]
features = ["dox"]
[lib]
name = "libostree"