Skip to content

Instantly share code, notes, and snippets.

@luisparravicini
Last active July 17, 2021 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisparravicini/a716c9e7412c28d5fa2a0b2d65ff88c7 to your computer and use it in GitHub Desktop.
Save luisparravicini/a716c9e7412c28d5fa2a0b2d65ff88c7 to your computer and use it in GitHub Desktop.
script to upload all the binaries for an itchio project
# The itch.io username
user=REPLACE_WITH_USERNAME
# The project name used for uploading
itchio_project=REPLACE_WITH_PROJECT_NAME
#!/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