Created
May 21, 2021 07:54
-
-
Save waynezhang/2dee342f2d5a213119a9e7f07b678948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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