Last active
July 17, 2021 17:05
-
-
Save luisparravicini/a716c9e7412c28d5fa2a0b2d65ff88c7 to your computer and use it in GitHub Desktop.
script to upload all the binaries for an itchio project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The itch.io username | |
user=REPLACE_WITH_USERNAME | |
# The project name used for uploading | |
itchio_project=REPLACE_WITH_PROJECT_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script uploads the binaries create by build_all.sh | |
# to itchio, using butler. | |
# | |
# It assumes this directory hierarchy: | |
# base_dir/ | |
# dist/ | |
# dist/$platform/ | |
# | |
# dist/ is where this script must be located | |
# dist/$platform/ is the directory of each build contents for platform $platform | |
dir=`dirname "$0"` | |
source "$dir"/itchio_config | |
function upload () { | |
which butler >/dev/null | |
if [ $? != 0 ]; then | |
echo make sure butler is installed | |
echo look at https://itch.io/docs/butler/installing.html | |
exit 1 | |
fi | |
echo uploading $itchio_project:$platform | |
platform_dir="$dir"/$platform | |
butler push "$platform_dir" $user/$itchio_project:$platform | |
} | |
platform=linux | |
upload | |
platform=macOS | |
upload | |
platform=windows | |
upload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment