mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-10 22:50:32 +00:00
Tweak version check
This commit is contained in:
6
main.sh
6
main.sh
@@ -386,10 +386,10 @@ fi
|
|||||||
for tool in "${tools[@]}"; do
|
for tool in "${tools[@]}"; do
|
||||||
if [[ "${tool}" == *"@"* ]]; then
|
if [[ "${tool}" == *"@"* ]]; then
|
||||||
version="${tool#*@}"
|
version="${tool#*@}"
|
||||||
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$|^latest$ ]]; then
|
|
||||||
bail "install-action does not support semver operators"
|
|
||||||
fi
|
|
||||||
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)$|^latest$ ]]; then
|
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)$|^latest$ ]]; then
|
||||||
|
if [[ ! "${version}" =~ ^([1-9][0-9]*(\.[0-9]+(\.[0-9]+)?)?|0\.[1-9][0-9]*(\.[0-9]+)?|^0\.0\.[0-9]+)(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$|^latest$ ]]; then
|
||||||
|
bail "install-action does not support semver operators"
|
||||||
|
fi
|
||||||
bail "install-action v2 does not support semver pre-release and build-metadata; please submit an issue if you need these supports again"
|
bail "install-action v2 does not support semver pre-release and build-metadata; please submit an issue if you need these supports again"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user