Skip to content
Snippets Groups Projects
Commit 4188503d authored by Johannes von Zmuda-Trzebiatowski's avatar Johannes von Zmuda-Trzebiatowski
Browse files

Do not fail if no release present for a project

parent 1be19a60
No related branches found
Tags 0.9
No related merge requests found
Pipeline #399836 passed
......@@ -16,7 +16,7 @@ set -e
response=$(curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --silent "https://$GITLAB_URL/api/v4/projects/$1/releases")
# Check if the response is an array (valid JSON structure for releases)
if echo "$response" | tr '\n' ' ' | jq -e 'type == "array" and length > 0' > /dev/null; then
if echo "$response" | tr '\n' ' ' | jq -e 'type == "array"' > /dev/null; then
echo "Downloading assets for $1"
echo "$response" | tr '\n' ' ' | jq -r '.[].assets.links[] | "\(.name),\(.url)"' | while IFS=',' read -r name url; do
echo "Downloading $name from $url"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment