Skip to content

Instantly share code, notes, and snippets.

@dieseltravis
Last active August 31, 2023 05:25
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 dieseltravis/88c2acdada337fdf314965f37d7ce52c to your computer and use it in GitHub Desktop.
Save dieseltravis/88c2acdada337fdf314965f37d7ce52c to your computer and use it in GitHub Desktop.
Deploying Godot exports to Itch.io using Butler
#!/bin/bash
set -euo pipefail
# itch.io user name
user=travishardiman
# itcg.io project name
project=turtles
itch="$user/$project"
# base folder where each of the export folders are
folder=~/Projects/godot-projects/turtlescript/bin/deploy
# project.godot file
cfg=~/Projects/godot-projects/turtlescript/project.godot
# be sure to add this plugin to set the version:
# https://github.com/fcazalet/godot-version-management
# Load the project version number from the config value
cfgversion="$(grep -Po 'config\/version=\"\K((\d+\.)*\d+)' $cfg)"
#cfgbuild="$(grep -Po 'config\/build=\K(\d+)' $cfg)"
version="$cfgversion"
deploy="push -v --beeps4life --if-changed --userversion=$version"
# deploying with butler
# https://itchio.itch.io/butler
echo "deploying html5..."
butler $deploy $folder/html5 $itch:html5
echo "deploying windows..."
butler $deploy $folder/windows $itch:windows
echo "deploying linux..."
butler $deploy --fix-permissions $folder/linux $itch:linux-universal
echo "deploying mac..."
butler $deploy --fix-permissions $folder/mac $itch:mac-universal
echo -e "..."
sleep 3
echo "butler status $itch"
# call this to get status from itch.io
butler status $itch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment