Skip to content

Commit f12a32f

Browse files
Fix docsrs build (#174)
* Fix docsrs build Fix docs.rs build by removing exclusion on protobuf code generation when `DOCS_RS` environment variable is set. Signed-off-by: Dwayne Sykes <[email protected]> * Update spiffe/build.rs --------- Signed-off-by: Dwayne Sykes <[email protected]> Co-authored-by: Max Lambrecht <[email protected]>
1 parent ca569f8 commit f12a32f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

spiffe/build.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ use std::{env, fs};
44
use anyhow::{ensure, Context as _};
55

66
fn main() -> anyhow::Result<()> {
7-
println!("cargo::rerun-if-changed=src/proto");
8-
println!("cargo::rerun-if-env-changed=DOCS_RS");
9-
10-
// Check if this is a docs.rs build
11-
if env::var_os("DOCS_RS").is_some() {
12-
println!("cargo:warning=Skipping protobuf code generation on docs.rs.");
13-
return Ok(());
14-
}
7+
println!("cargo:rerun-if-changed=src/proto");
8+
159
let out_dir = env::var_os("OUT_DIR").context("failed to lookup `OUT_DIR`")?;
1610
let out_dir = Path::new(&out_dir);
1711

0 commit comments

Comments
 (0)