Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
set -e
# sign.sh app release_id file
APP=$1
RELEASE_ID=$2
FILE=$3
SIGNATURE=$(./bin/sign_update ${FILE} | sed 's/[^"]*="\([^"]*\).*/\1/g')
TOKEN=$(security find-generic-password -gws "AppCenter Sparkle Token")
echo "Sign ${APP} release ${RELEASE_ID}, signature $SIGNATURE"
curl -X "PATCH" "https://api.appcenter.ms/v0.1/apps/${APP}/releases/${RELEASE_ID}" \
-H "X-API-Token: $TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $"{
\"metadata\": {
\"ed_signature\": \"$SIGNATURE\"
}
}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment