From 1e45b8dd9a7d8be627ca491fb4f5ee049343670c Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 4 Mar 2024 16:13:45 +0200 Subject: [PATCH] throw if we don't get the upload_url --- doc/rpm-build/checkout-build-archives.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/rpm-build/checkout-build-archives.php b/doc/rpm-build/checkout-build-archives.php index 9d35aa1449..84d23e7dad 100755 --- a/doc/rpm-build/checkout-build-archives.php +++ b/doc/rpm-build/checkout-build-archives.php @@ -455,7 +455,12 @@ function do_upload() if (empty($config['upload_url'])) { - $response = github_api("/repos/EGroupware/egroupware/releases", array(), 'GET'); + $response = github_api("/repos/EGroupware/egroupware/releases", [], 'GET'); + if (empty($response[0]['upload_url'])) + { + throw new Exception("github_api('/repos/EGroupware/egroupware/releases', [], 'GET') responded with ". + json_encode($response, JSON_UNESCAPED_SLASHES)); + } $config['upload_url'] = preg_replace('/{\?[^}]+}$/', '', $response[0]['upload_url']); // remove {?name,label} template }