-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
2,624 additions
and
672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
#----------------------------------------------------------- | ||
# 此脚本用于每次升级Hutool时替换相应位置的版本号 | ||
#----------------------------------------------------------- | ||
|
||
set -o errexit | ||
|
||
pwd=`pwd` | ||
|
||
echo "当前路径:${pwd}" | ||
|
||
if [ -n "$1" ];then | ||
new_version="$1" | ||
old_version=`cat ${pwd}/bin/version.txt` | ||
echo "$old_version 替换为新版本 $new_version" | ||
else | ||
# 参数错误,退出 | ||
echo "ERROR: 请指定新版本!" | ||
exit | ||
fi | ||
|
||
if [ ! -n "$old_version" ]; then | ||
echo "ERROR: 旧版本不存在,请确认bin/version.txt中信息正确" | ||
exit | ||
fi | ||
|
||
# 替换README.md中的版本 | ||
sed -i "s/${old_version}/${new_version}/g" $pwd/README.md | ||
# 替换docs/index.html中的版本 | ||
sed -i "s/${old_version}/${new_version}/g" $pwd/docs/index.html | ||
|
||
# 保留新版本号 | ||
echo "$new_version" > $pwd/bin/version.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
#!/bin/bash | ||
|
||
#------------------------------------------------ | ||
# 升级Hutool版本,包括: | ||
# 1. 升级pom.xml中的版本号 | ||
# 2. 替换README.md和docs中的版本号 | ||
#------------------------------------------------ | ||
|
||
if [ ! -n "$1" ]; then | ||
echo "ERROR: 新版本不存在,请指定参数1" | ||
exit | ||
fi | ||
|
||
# 替换所有模块pom.xml中的版本 | ||
mvn versions:set -DnewVersion=$1 | ||
|
||
# 不带-SNAPSHOT的版本号,用于替换其它地方 | ||
version=${1%-SNAPSHOT} | ||
|
||
# 替换其它地方的版本 | ||
`pwd`/bin/replaceVersion.sh "$version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4.5.0 |
Oops, something went wrong.