~gardenapple/mitch

ref: 34009112c1a0cac146e57a19e76da6e3651a70c7 mitch/itch-upload -rw-r--r-- 688 bytes
34009112gardenapple Merge remote-tracking branch 'weblate/main' 4 months ago
                                                                                
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
#!/bin/sh

if [ $# -eq 0 ]; then
    echo "Supply version number (such as 1.0.1)"
    exit 1
fi

if [ "$1" != "$(jq '.elements[0].versionName' --raw-output \
	< app/build/outputs/apk/itchio/release/output-metadata.json)" ]; then
    echo "Error: version number does not match metadata!"
    exit 1
fi

if [ "$(git status --porcelain | wc --lines)" -ne 0 ]; then
    echo "Error: uncommited changes!"
    exit 1
fi

if [ "$(git rev-parse main)" != "$(git rev-parse origin/main)" ]; then
    echo "Error: main branch not sync with origin/main!"
    exit 1
fi

butler login
butler push app/build/outputs/apk/itchio/release/app-itchio-release.apk gardenapple/mitch:android --userversion "$1"