Merge pull request #1 from relsqui/master

Support package names with spaces in them
This commit is contained in:
Layla 2020-03-08 18:33:26 -04:00 committed by GitHub
commit 1ce8a7caab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View File

@ -5,13 +5,12 @@ LABEL "com.github.actions.description"="Publishes releases to Itch.io using Butl
LABEL "com.github.actions.icon"="upload" LABEL "com.github.actions.icon"="upload"
LABEL "com.github.actions.color"="white" LABEL "com.github.actions.color"="white"
RUN yum update -y
# Install Butler # Install Butler
ADD https://dl.itch.ovh/butler/linux-amd64/head/butler /usr/bin/ ADD https://dl.itch.ovh/butler/linux-amd64/head/butler /usr/bin/
RUN chmod +x /usr/bin/butler RUN chmod +x /usr/bin/butler
RUN butler upgrade --assume-yes
# Run butler push # Run butler push
ADD entrypoint.sh /entrypoint.sh ADD entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh RUN chmod +x entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@ -4,16 +4,15 @@ set -e
mkdir -p ~/.config/itch mkdir -p ~/.config/itch
echo $BUTLER_CREDENTIALS > ~/.config/itch/butler_creds echo $BUTLER_CREDENTIALS > ~/.config/itch/butler_creds
versionArgument=""
versionArguement=""
if [ "$VERSION" != "" ] if [ "$VERSION" != "" ]
then then
versionArguement="--userversion ${VERSION}" versionArgument="--userversion ${VERSION}"
elif [ "$VERSION_FILE" != "" ] elif [ "$VERSION_FILE" != "" ]
then then
versionArguement="--userversion-file ${VERSION_FILE}" versionArgument="--userversion-file ${VERSION_FILE}"
fi fi
echo "butler push $PACKAGE $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArguement}" echo "butler push \"$PACKAGE\" $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArgument}"
butler push $PACKAGE $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArguement} butler push "$PACKAGE" $ITCH_USER/$ITCH_GAME:$CHANNEL ${versionArgument}