From e71b0bb15875937e5acf01aa2526303d4fe3f160 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Fri, 24 May 2024 19:25:52 +0200 Subject: [PATCH] automate publication to itch.io --- README.org | 4 ++-- publish.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100755 publish.sh diff --git a/README.org b/README.org index 4720b1d..b595508 100644 --- a/README.org +++ b/README.org @@ -36,7 +36,7 @@ let the _others_ fall in so you can pass over their head. So now, go out, collect the keys and maintain a healthy diet! -* Game Plan [19/22] +* Game Plan [20/22] - [X] start project organization - [X] select some assets to start with @@ -50,7 +50,7 @@ So now, go out, collect the keys and maintain a healthy diet! - [X] wrap the script to find the libraries - [X] ensure the assets can be found by the render packages - [X] upload to itch.io - - [ ] automate upload to itch.io + - [X] automate upload to itch.io - [X] create other's AI - [X] add keys and portal - [X] make other avoid each other diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..472eb7e --- /dev/null +++ b/publish.sh @@ -0,0 +1,35 @@ + +ITCH_CHANNEL=snamellit/Bloatrunner + +if [[ ! -f Makefile ]]; then + make distclean +fi + +./bootstrap.sh +./configure GUILE=$(which guile) +make -j16 +make dist + +SOURCETAR=$(ls bloatrunner-*.tar.gz | head -n 1) + +if [ -f "$SOURCETAR" ]; then + echo "Found source tarball $SOURCE" + BASENAME=$(basename $SOURCETAR .tar.gz) + echo releasing $BASENAME + + butler push $SOURCETAR $ITCH_CHANNEL:source + + TARBALL=$(guix pack -R -Sbloatrunner=bin -L .guix/modules bloatrunner) + echo created $TARBALL + TARGETNAME=/tmp/$BASENAME-linux-x86_64.tar.gz + echo copy $TARBALL to $TARGETNAME + rm -f $TARGETNAME + cp $TARBALL $TARGETNAME + + echo push $TARGETNAME + butler push $TARGETNAME $ITCH_CHANNEL:linux-x86_64 + +else + echo "No source tarball found" + exit 1 +fi