Skip to content

Commit

Permalink
update publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
myin142 committed May 20, 2023
1 parent 36d2065 commit 49b0bc9
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
# butler

GAME="##VAR_GAME_NAME"
VERSION=$1
if [[ -z $VERSION ]]; then
echo "Version missing"
exit 0
fi
VERSION="$1"

ARGS=("$@")
if [[ ${#ARGS[@]} == 1 ]]; then
if [[ ${#ARGS[@]} -lt 2 ]]; then
echo "No channels"
exit 0
fi
Expand Down Expand Up @@ -67,13 +63,19 @@ itch_release() {
done
}

generate_changelog

sh ./addons/debug/prepare-build.sh
# sh ./addons/debug/prepare-build.sh $VERSION
build_channels

if [[ $VERSION != *"-rc"* ]]; then
itch_release
fi
VERSION_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$'
if [[ $VERSION =~ $VERSION_REGEX ]]; then
generate_changelog

github_release
if [[ $VERSION != *"-rc"* ]]; then
itch_release
fi

github_release

else
echo "Missing or invalid version. Publish skipped."
fi

0 comments on commit 49b0bc9

Please sign in to comment.