|
@ -23,16 +23,18 @@ fi |
|
|
VERSION_PREVIOUS=`sed -n '4,4p' CHANGELOG.md | cut -d "(" -f1` |
|
|
VERSION_PREVIOUS=`sed -n '4,4p' CHANGELOG.md | cut -d "(" -f1` |
|
|
if [ `git rev-parse ${VERSION_PREVIOUS}` != `git rev-parse HEAD` ] |
|
|
if [ `git rev-parse ${VERSION_PREVIOUS}` != `git rev-parse HEAD` ] |
|
|
then |
|
|
then |
|
|
VERSION=`echo ${VERSION_PREVIOUS} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}` |
|
|
|
|
|
gitchangelog > CHANGELOG.md && |
|
|
|
|
|
git add CHANGELOG.md && |
|
|
|
|
|
git commit -m "Update CHANGELOG.md on ${VERSION}" && |
|
|
|
|
|
|
|
|
VERSION=`echo ${VERSION_PREVIOUS} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}'` |
|
|
git tag $VERSION && |
|
|
git tag $VERSION && |
|
|
git push --tags |
|
|
|
|
|
|
|
|
gitchangelog > CHANGELOG.md && |
|
|
|
|
|
(git add CHANGELOG.md > /dev/null && |
|
|
|
|
|
git commit -m 'Update CHANGELOG.md' > /dev/null && |
|
|
|
|
|
git push --tags --porcelain > /dev/null) || |
|
|
|
|
|
(echo -e "Cannot push released tag into remote repository\n" && |
|
|
|
|
|
exit 1) |
|
|
else |
|
|
else |
|
|
VERSION=$VERSION_PREVIOUS |
|
|
VERSION=$VERSION_PREVIOUS |
|
|
fi |
|
|
fi |
|
|
git push > /dev/null || exit 1 |
|
|
|
|
|
|
|
|
git push --porcelain > /dev/null || exit 1 |
|
|
|
|
|
|
|
|
MESSAGE="Update ${PATH_LIB} on ${VERSION}" |
|
|
MESSAGE="Update ${PATH_LIB} on ${VERSION}" |
|
|
CURRENT_DIR=`pwd` |
|
|
CURRENT_DIR=`pwd` |
|
|