-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish
executable file
·65 lines (62 loc) · 2.03 KB
/
publish
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
61
62
63
64
65
#!/usr/bin/env bash
REALNAME="Antsy Alien Attack Pico"
LOWERNAME="${REALNAME,,}"
FILENAME="${LOWERNAME// /-}"
ITCH_USER="wimpress"
ITCH_GAME="${FILENAME}"
if ! which butler ; then
echo "ERROR! butler not found. Please install butler."
exit 1
fi
if [ -e "${HOME}"/.config/itch/butler_creds ]; then
VER=$(head -n1 exports/version.txt)
for PLATFORM in appimage cart deb dmg linux raspi wasm_crt windows snap; do
case "${PLATFORM}" in
appimage)
CHANNEL="linux_appimage"
EXT="AppImage"
butler push "exports/${FILENAME}_${VER}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
cart)
PLATFORM="p8"
CHANNEL="pico-8"
EXT="png"
butler push "exports/${FILENAME}.${PLATFORM}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
deb)
PLATFORM="amd64"
CHANNEL="linux_debian"
EXT="deb"
butler push "exports/${FILENAME}_${VER}_${PLATFORM}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
dmg)
PLATFORM=""
CHANNEL="osx"
EXT="dmg"
butler push "exports/${FILENAME}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
html*|wasm*)
CHANNEL="html"
EXT="zip"
butler push "exports/${FILENAME}_${PLATFORM}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
raspi)
CHANNEL="linux_raspi"
EXT="zip"
butler push "exports/${FILENAME}_${PLATFORM}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
snap)
PLATFORM="amd64"
EXT="snap"
snapcraft upload "exports/${FILENAME}_${VER}_${PLATFORM}.${EXT}" --release stable
;;
*)
CHANNEL="${PLATFORM}"
EXT="zip"
butler push "exports/${FILENAME}_${PLATFORM}.${EXT}" "${ITCH_USER}/${ITCH_GAME}:${CHANNEL}" --userversion "${VER}"
;;
esac
done
else
echo "WARNING! Not crednetial for Butler found. Skipping Itch publishing."
fi