Skip to content

Commit

Permalink
debug release asset
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed May 27, 2024
1 parent 3b75b43 commit 58505c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ services:
*with-default-privileges,
*with-default-volumes,
]
image: balena/open-balena-api:v22.2.1
image: balena/open-balena-api:v22.2.2
depends_on:
- db
- redis
Expand Down
6 changes: 4 additions & 2 deletions src/balena-tests/balena.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,15 @@ function upload_release_asset() {
local release_id
release_id=${1:-1}

response="$(curl --silent --retry "${ATTEMPTS}" --fail "https://api.${DNS_TLD}/resin/release_asset" \
response="$(curl -v --retry "${ATTEMPTS}" --fail \
"https://api.${DNS_TLD}/resin/release_asset" \
--header "Authorization: Bearer $(cat <~/.balena/token)" \
--form 'asset=@logo.png' \
--form "release=${release_id}" \
--form "asset_key=logo-$((RANDOM)).png")" && echo "${response}" | jq -re

echo "${response}" | jq -re .asset.href | xargs curl --retry "${ATTEMPTS}" -sfivo "/tmp/logo-$((RANDOM)).png"
echo "${response}" | jq -re .asset.href \
| xargs curl --retry "${ATTEMPTS}" -sfivo "/tmp/logo-$((RANDOM)).png"
}

# --- main
Expand Down

0 comments on commit 58505c2

Please sign in to comment.