mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
If the latest commit is a tag,
This commit is contained in:
parent
9268af104e
commit
084fb736c6
@ -8,6 +8,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NOW=$(date +%s)
|
||||
CURRENT_BRANCH="master"
|
||||
VERSION=$1
|
||||
BASEPATH=$(cd `dirname $0`; cd ../src/; pwd)
|
||||
@ -24,7 +25,7 @@ for REMOTE in $repos
|
||||
do
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Releasing $REMOTE";
|
||||
echo "Cloning $REMOTE";
|
||||
TMP_DIR="/tmp/hyperf-split"
|
||||
REMOTE_URL="git@github.com:hyperf-cloud/$REMOTE.git"
|
||||
|
||||
@ -37,7 +38,14 @@ do
|
||||
git clone $REMOTE_URL .
|
||||
git checkout "$CURRENT_BRANCH";
|
||||
|
||||
git tag $VERSION
|
||||
git push origin --tags
|
||||
if [[ $(git log --pretty="%d" -n 1 | grep tag --count) -eq 0 ]]; then
|
||||
echo "Releasing $REMOTE"
|
||||
git tag $VERSION
|
||||
git push origin --tags
|
||||
fi
|
||||
)
|
||||
done
|
||||
done
|
||||
|
||||
TIME=$(echo "$(date +%s) - $NOW" | bc)
|
||||
|
||||
printf "Execution time: %f seconds" $TIME
|
Loading…
Reference in New Issue
Block a user