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) <[email protected]>
This commit is contained in:
Miles Ward
2026-05-29 15:05:17 -04:00
co-authored by Claude Opus 4.8
parent fc99973ac3
commit f9df3f8bd8
2 changed files with 10 additions and 6 deletions
+6 -6
View File
@@ -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]