-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sh
executable file
·26 lines (19 loc) · 1.08 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
: ${SIGN_KEYSTORE?"Need to set SIGN_KEYSTORE"}
: ${SIGN_PASSWORD?"Need to set SIGN_PASSWORD"}
: ${FEEDBACK_TELEGRAM?"Need to set FEEDBACK_TELEGRAM"}
: ${GITHUB_AUTH?"Need to set GITHUB_AUTH"}
export SING_BUILD=$(git rev-list --count origin/master)0
./gradlew clean assembleRelease
# cd ios && ./build-frameworks.sh && cd ..
# ./gradlew clean build assembleRelease robovmArchive
UPLOAD_RESPONSE=$(curl --user $GITHUB_AUTH --data "{\"tag_name\":\"0.9.$SING_BUILD\"}" "https://api.github.com/repos/y2k/JoyReactor/releases")
ASSET_ID=$(echo $UPLOAD_RESPONSE | grep -oE "id\": \d+, \"tag" | grep -oE "\d+")
# curl --user $GITHUB_AUTH \
# -T "ios/build/robovm/JoyReactor.ipa" \
# -H "Content-Type: application/octet-stream" \
# "https://uploads.github.com/repos/y2k/JoyReactor/releases/$ASSET_ID/assets?name=JoyReactor.ipa"
curl --user $GITHUB_AUTH \
-T "android/build/outputs/apk/android-release.apk" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/y2k/JoyReactor/releases/$ASSET_ID/assets?name=JoyReactor.apk"
echo App version = $SING_BUILD