mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -12,7 +12,7 @@ echo "当前路径:${pwd}"
|
||||
|
||||
if [ -n "$1" ];then
|
||||
new_version="$1"
|
||||
old_version=`cat ${pwd}/bin/version.txt`
|
||||
old_version=$(cat "${pwd}"/bin/version.txt)
|
||||
echo "$old_version 替换为新版本 $new_version"
|
||||
else
|
||||
# 参数错误,退出
|
||||
@@ -20,16 +20,16 @@ else
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -n "$old_version" ]; then
|
||||
if [ -z "$old_version" ]; then
|
||||
echo "ERROR: 旧版本不存在,请确认bin/version.txt中信息正确"
|
||||
exit
|
||||
fi
|
||||
|
||||
# 替换README.md中的版本
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/README.md
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/README-EN.md
|
||||
sed -i "s/${old_version}/${new_version}/g" "$pwd"/README.md
|
||||
sed -i "s/${old_version}/${new_version}/g" "$pwd"/README-EN.md
|
||||
# 替换docs/js/version.js中的版本
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/docs/js/version.js
|
||||
sed -i "s/${old_version}/${new_version}/g" "$pwd"/docs/js/version.js
|
||||
|
||||
# 保留新版本号
|
||||
echo "$new_version" > $pwd/bin/version.txt
|
||||
echo "$new_version" > "$pwd"/bin/version.txt
|
||||
|
Reference in New Issue
Block a user