mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-08 19:54:13 +08:00
Sync installers: 2025-03-07 11:30
This commit is contained in:
parent
1d0aa144af
commit
a14ffd4214
@ -7,7 +7,7 @@
|
|||||||
# Contributors : Aoran Zeng <ccmywish@qq.com>
|
# Contributors : Aoran Zeng <ccmywish@qq.com>
|
||||||
# |
|
# |
|
||||||
# Created On : <2024-10-25>
|
# Created On : <2024-10-25>
|
||||||
# Last Modified : <2024-12-08>
|
# Last Modified : <2025-03-07>
|
||||||
#
|
#
|
||||||
# chsrc installer for Linux & macOS
|
# chsrc installer for Linux & macOS
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -157,12 +157,12 @@ install() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ ! "$userOpt_version" =~ ^(pre|0\.1\.([4-9]))$ ]]; then
|
if [[ ! "$userOpt_version" =~ ^(pre|0\.([1-9])\.([0-9]))$ ]]; then
|
||||||
# version 不符合条件,报错
|
# version 不符合条件,报错
|
||||||
if [ "$userOpt_lang" = "zh" ]; then
|
if [ "$userOpt_lang" = "zh" ]; then
|
||||||
error "不支持的版本: ${userOpt_version},版本号必须在 0.1.4 到 0.1.9 之间或为 'pre'"
|
error "不支持的版本: ${userOpt_version},版本号必须为 0.x.y (>=0.1.4) 或 'pre'"
|
||||||
else
|
else
|
||||||
error "Unsupported version: ${userOpt_version}. Version number must be between 0.1.4 and 0.1.9 or 'pre'"
|
error "Unsupported version: ${userOpt_version}. Version number must be 0.x.y (>=0.1.4) or 'pre'"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# Contributors : Aoran Zeng <ccmywish@qq.com>
|
# Contributors : Aoran Zeng <ccmywish@qq.com>
|
||||||
# |
|
# |
|
||||||
# Created On : <2024-10-26>
|
# Created On : <2024-10-26>
|
||||||
# Last Modified : <2024-12-08>
|
# Last Modified : <2025-03-07>
|
||||||
#
|
#
|
||||||
# chsrc installer for Windows
|
# chsrc installer for Windows
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@ -96,10 +96,10 @@ function Set_Install_Dir {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Set_Version {
|
function Set_Version {
|
||||||
$pattern = '^(0\.1\.[4-9]|pre)$'
|
$pattern = '^(0\.[1-9]\.[0-9]|pre)$'
|
||||||
|
|
||||||
if ($Version -notmatch $pattern) {
|
if ($Version -notmatch $pattern) {
|
||||||
output_error "Invalid version '$Version'. Please provide a valid version (0.1.4 - 0.1.9 or 'pre')."
|
output_error "Invalid version '$Version'. Please provide a valid version: 0.x.y (>=0.1.4) or 'pre'"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 设置版本号
|
# 设置版本号
|
||||||
|
Loading…
x
Reference in New Issue
Block a user