Skip to content

Commit

Permalink
Fix deploy.sh bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Jun 19, 2024
1 parent f618bc1 commit 8a601ef
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@ set -e

SOURCE_DIR=`pwd`

PRE_TAG=`git tag --sort=-creatordate | head -n 1`

if [ -n "$1" ]; then
VERSION=`git describe --tags`
if [ -z "$VERSION" ]; then
VERSION=` git rev-parse HEAD`
VERSION=`git rev-parse HEAD`
fi

echo "Current version: $VERSION, The version to will be set: $1"

if [ -n "$2" ]; then
MESSAGE="Release $1 $2"
else
MESSAGE="Release $1"
fi

PRE_TAG=`git tag --sort=-taggerdate | head -n 1`
echo "Current version: $VERSION, current tag: $PRE_TAG. The version to will be set tag version: $1 message: $MESSAGE"
echo "Please check the follow list:"
echo " - Test is ok ?"
echo " - Translation is ok ?"
echo " - Setup file is ok ?"
echo " - Update_*.xml is ok ?"

read -t 30 -p "Be sure to input Y, not input N: " INPUT
if [ "$INPUT" != "Y" -a "$INPUT" != "y" ]; then
exit 0
fi
git tag -a $1 -m "Release $1"
git tag -a $1 -m "Release $1 ${MESSAGE}"
else
echo "Usage: $0 release_version [release_message]"
echo " release_version format: [v][0-9].[0-9].[0-9]"
exit -1
fi

VERSION=`git describe --tags`
Expand Down

0 comments on commit 8a601ef

Please sign in to comment.