Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd2df7d986 |
@@ -323,27 +323,13 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract asset IDs for binary and checksums
|
# Extract asset IDs for binary and checksums
|
||||||
BINARY_ASSET_ID=$(printf '%s' "$RELEASE_JSON" | python3 -c "
|
BINARY_ASSET_ID=$(printf '%s' "$RELEASE_JSON" | python3 -c "import sys, json; assets = json.load(sys.stdin).get('assets', []); matches = [a['id'] for a in assets if a['name'] == '${BINARY}']; print(matches[0] if matches else '')")
|
||||||
import sys, json
|
|
||||||
assets = json.load(sys.stdin).get('assets', [])
|
|
||||||
for a in assets:
|
|
||||||
if a['name'] == '${BINARY}':
|
|
||||||
print(a['id'])
|
|
||||||
break
|
|
||||||
")
|
|
||||||
if [ -z "$BINARY_ASSET_ID" ]; then
|
if [ -z "$BINARY_ASSET_ID" ]; then
|
||||||
echo "Error: could not find asset '${BINARY}' in release ${VERSION}" >&2
|
echo "Error: could not find asset '${BINARY}' in release ${VERSION}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CHECKSUMS_ASSET_ID=$(printf '%s' "$RELEASE_JSON" | python3 -c "
|
CHECKSUMS_ASSET_ID=$(printf '%s' "$RELEASE_JSON" | python3 -c "import sys, json; assets = json.load(sys.stdin).get('assets', []); matches = [a['id'] for a in assets if a['name'] == 'checksums.txt']; print(matches[0] if matches else '')")
|
||||||
import sys, json
|
|
||||||
assets = json.load(sys.stdin).get('assets', [])
|
|
||||||
for a in assets:
|
|
||||||
if a['name'] == 'checksums.txt':
|
|
||||||
print(a['id'])
|
|
||||||
break
|
|
||||||
")
|
|
||||||
if [ -z "$CHECKSUMS_ASSET_ID" ]; then
|
if [ -z "$CHECKSUMS_ASSET_ID" ]; then
|
||||||
echo "Error: could not find asset 'checksums.txt' in release ${VERSION}" >&2
|
echo "Error: could not find asset 'checksums.txt' in release ${VERSION}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user