-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish-itch.sh
executable file
·60 lines (51 loc) · 1.21 KB
/
publish-itch.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
. ./make-vars.sh
# Set to your itch username
ORG=ioribranford
VERSION=$1
if [ ! ${VERSION} ]
then
echo "Usage: publish-itch.sh <VERSION>"
echo "(after downloading artifacts via download-artifacts.sh)"
exit 1
fi
MASTER=$(git branch --all --contains ${VERSION} | grep -c master)
if [ $MASTER != "0" ]
then
echo "ERROR: $VERSION is on the master branch. It very likely contains WIP content."
exit 1
fi
PROJECT=${PROJECT:=${PWD##*/}}
BUTLER=${BUTLER:=butler}
publish() {
CHANNEL=$1
FILE=${PROJECT}-${VERSION}-${CHANNEL}.zip
if [ -e ${FILE} ]
then $BUTLER push --userversion ${VERSION} ${FILE} ${ORG}/${PROJECT}:${CHANNEL}
fi
}
# publish win-32
publish win-64
# publish osx
# publish android
# publish linux-x86_64
# publish linux-i686
# publish linux-armhf
publish data
publish web
# publish demo-win-32
# publish demo-win-64
# publish demo-osx
# publish demo-android
# publish demo-linux-x86_64
# publish demo-linux-i686
# publish demo-linux-armhf
# publish demo-data
. ./make-vars-android.sh
ANDROID_FILE=${PROJECT}-${VERSION}-android.zip
if [ -e ${FILE} ]
then
ANDROID_APK=${GAME_TITLE_NOSPACE}.apk
unzip $ANDROID_FILE $ANDROID_APK
$BUTLER push --userversion ${VERSION} ${ANDROID_APK} ${ORG}/${PROJECT}:android
fi