Fix syntax error in curl asset id retrieval call.

This commit is contained in:
Sebastian Roth
2022-02-12 23:07:53 +01:00
parent ef639499e5
commit b32bdc6a8c

View File

@@ -43,7 +43,7 @@ do
fi
echo "Uploading ${i}..."
if [[ -n "$1" ]]; then
ASSET_ID=$(curl -s -X GET -u ${GITHUB_USER}:${GITHUB_TOKEN} -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/FOGProject/fos/releases/${GITHUB_RELEASE_ID}/assets | jq -r '.[] | "\(.id),\(.name)"') | grep ",${i}\$"| cut -f1 -d,)
ASSET_ID=$(curl -s -X GET -u ${GITHUB_USER}:${GITHUB_TOKEN} -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/FOGProject/fos/releases/${GITHUB_RELEASE_ID}/assets | jq -r '.[] | "\(.id),\(.name)"' | grep ",${i}\$"| cut -f1 -d,)
if [[ -n "${ASSET_ID}" ]]; then
curl -s -X DELETE -u ${GITHUB_USER}:${GITHUB_TOKEN} -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/FOGProject/fos/releases/assets/${ASSET_ID}
fi