diff --git a/Cargo.toml b/Cargo.toml index a794f06..8dfdb3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" snmp = "0.2" ureq = { version = "2.10", features = ["json"] } tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "net"] } -tokio-tungstenite = { version = "0.21", features = ["native-tls"] } +tokio-tungstenite = { version = "0.21", features = ["rustls-tls-webpki-roots"] } futures = "0.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/Dockerfile b/Dockerfile index 46696bf..dd5f92a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM WORKDIR /app # Install build dependencies -RUN apk add --no-cache musl-dev protobuf-dev openssl-dev openssl-libs-static +RUN apk add --no-cache musl-dev protobuf-dev # Determine Rust target based on platform and add it RUN case "$TARGETPLATFORM" in \ diff --git a/build.rs b/build.rs index bf17a6c..a6ccb99 100644 --- a/build.rs +++ b/build.rs @@ -30,7 +30,10 @@ fn get_version() -> String { } // Fallback: Try short commit hash only - if let Ok(output) = Command::new("git").args(["rev-parse", "--short", "HEAD"]).output() { + if let Ok(output) = Command::new("git") + .args(["rev-parse", "--short", "HEAD"]) + .output() + { if output.status.success() { let commit = String::from_utf8_lossy(&output.stdout).trim().to_string(); return format!("{}.{}", env!("CARGO_PKG_VERSION"), commit); @@ -56,10 +59,18 @@ fn parse_git_describe(desc: &str) -> Option { let commit_count = parts[0]; let hash = parts[1].strip_prefix('g').unwrap_or(parts[1]); let version = format!("{}.{}.{}", base, commit_count, hash); - return Some(if dirty { format!("{}-modified", version) } else { version }); + return Some(if dirty { + format!("{}-modified", version) + } else { + version + }); } } // No commits after tag, just use the tag - Some(if dirty { format!("{}-modified", desc) } else { desc.to_string() }) + Some(if dirty { + format!("{}-modified", desc) + } else { + desc.to_string() + }) }