Commit b382b081 authored by nanahira's avatar nanahira

Update upload-packager.sh

parent 67f6ea7c
Pipeline #4974 failed with stages
in 5 minutes and 40 seconds
......@@ -12,13 +12,27 @@ echo "Login succeeded."
appName="ygopro"
handleErrorMessage() {
rawJsonInput="$1"
successInfo=$(echo "$rawJsonInput" | jq '.success')
statusCode=$(echo "$rawJsonInput" | jq '.statusCode')
if [[ "$successInfo" != "true" ]]; then
failMessage=$(echo "$rawJsonInput" | jq '.success')
echo "$rawJsonInput"
exit 1
fi
}
runForDepot() {
platform=$1
locale=$2
archivePath="./dist/ygopro-$appVersion-$platform-$locale.tar.zst"
suffix="?platform=$platform&locale=$locale&arch=generic"
echo "Uploading $archivePath"
curl -H "$header" -X POST "$apiRoot/release/api/build/$appName/${appVersion}${suffix}" -F file=@$archivePath
result=$(curl -H "$header" -X POST "$apiRoot/release/api/build/$appName/${appVersion}${suffix}" -F file=@$archivePath)
handleErrorMessage "$result"
echo "$result" | jq .
}
runForDepot win32 zh-CN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment