- do not try java things when building for docs.rs

This commit is contained in:
Wim Pomp
2025-02-03 16:17:14 +01:00
parent 3c22cf743a
commit b612d33a35
4 changed files with 11 additions and 7 deletions

View File

@@ -6,10 +6,14 @@ use retry::{delay, delay::Exponential, retry};
fn main() -> anyhow::Result<()> {
println!("cargo:rerun-if-changed=build.rs");
Ok(retry(
Exponential::from_millis(1000).map(delay::jitter).take(4),
deploy_java_artifacts,
)?)
if std::env::var("DOCS_RS").is_ok() {
Ok(retry(
Exponential::from_millis(1000).map(delay::jitter).take(4),
deploy_java_artifacts,
)?)
} else {
Ok(())
}
}
fn deploy_java_artifacts() -> Result<(), J4RsError> {