From f9df3f8bd8ee90e887e7441026b699bfcc3e5fc8 Mon Sep 17 00:00:00 2001 From: Miles Ward Date: Fri, 29 May 2026 15:05:17 -0400 Subject: [PATCH] v0.5.0: fix update-check repository URL (inherit workspace repository) The About-tab "check for updates" returned "repository URL not configured at build time" because the http-api crate didn't inherit the workspace `repository` field, leaving CARGO_PKG_REPOSITORY empty. Add `repository.workspace = true` so the Gitea releases API URL derives correctly, and strengthen the unit test to assert the URL is present. Caught by the v0.5.0 container smoke test before publish. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/http-api/Cargo.toml | 4 ++++ crates/http-api/src/app.rs | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) 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]