Skip to content

Commit 82b1657

Browse files
committed
fix: use binary_name for download_url instead of pkg_name
The download_url needs the actual binary name (e.g. "clipcatd") to point to the correct artifact, not the recipe's pkg name ("clipcat").
1 parent 9a0f8e5 commit 82b1657

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

sbuild/src/commands/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ async fn post_build_processing(
600600
if let Err(e) = update_json_metadata(
601601
&json_path,
602602
pkg_name_dir,
603+
pkg_name_dir,
603604
&full_repo,
604605
&tag,
605606
bsum.as_deref(),
@@ -837,6 +838,7 @@ async fn post_build_processing(
837838
if let Err(e) = update_json_metadata(
838839
&json_path,
839840
meta_pkg_name,
841+
binary_name,
840842
&full_repo,
841843
&tag,
842844
bsum.as_deref(),

sbuild/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub fn parse_ghcr_path(recipe_path: &str) -> Option<(String, String)> {
4646
pub fn update_json_metadata(
4747
json_path: &Path,
4848
pkg_name: &str,
49+
binary_name: &str,
4950
ghcr_repo: &str,
5051
tag: &str,
5152
bsum: Option<&str>,
@@ -77,7 +78,7 @@ pub fn update_json_metadata(
7778
"download_url".to_string(),
7879
serde_json::json!(format!(
7980
"https://api.ghcr.pkgforge.dev/{}?tag={}&download={}",
80-
ghcr_repo, tag, pkg_name
81+
ghcr_repo, tag, binary_name
8182
)),
8283
);
8384

0 commit comments

Comments
 (0)