diff --git a/crates/http-api/Cargo.toml b/crates/http-api/Cargo.toml index 79214ac..86c87d0 100644 --- a/crates/http-api/Cargo.toml +++ b/crates/http-api/Cargo.toml @@ -4,6 +4,10 @@ version.workspace = true edition.workspace = true license.workspace = true authors.workspace = true +# v0.5.0: inherit the workspace repository so CARGO_PKG_REPOSITORY is +# populated at build time — the About-tab update check derives the +# Gitea releases API URL from it. +repository.workspace = true description = "HTTP server: ISO uploads, iPXE script generation, ISO streaming" [lints] diff --git a/crates/http-api/src/app.rs b/crates/http-api/src/app.rs index 6c07cbb..81a4a53 100644 --- a/crates/http-api/src/app.rs +++ b/crates/http-api/src/app.rs @@ -2345,12 +2345,12 @@ mod tests { #[test] fn gitea_api_url_derives_from_repo() { - // CARGO_PKG_REPOSITORY is set from the workspace manifest. - let url = gitea_releases_api_url(); - if let Some(u) = url { - assert!(u.contains("/api/v1/repos/"), "got: {u}"); - assert!(u.ends_with("/releases/latest"), "got: {u}"); - } + // The crate inherits the workspace `repository`, so + // CARGO_PKG_REPOSITORY is populated and the update check has a + // real URL to hit (regressed once when the inherit was missing). + let u = gitea_releases_api_url().expect("repository must be configured at build time"); + assert!(u.contains("/api/v1/repos/"), "got: {u}"); + assert!(u.ends_with("/releases/latest"), "got: {u}"); } #[test]