Tighten regex for release version

This commit is contained in:
Dave Rolsky 2024-05-18 12:31:09 +08:00
parent ace37a7d90
commit 6f63b60be6
No known key found for this signature in database

View File

@ -9,7 +9,7 @@ VERSION="$2"
cd "$CROSS_DIR"
if [[ -n $VERSION ]] && ! [[ $VERSION =~ ^v ]]; then
if [[ -n $VERSION ]] && ! [[ $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
cargo install cross --git https://github.com/cross-rs/cross --rev "$VERSION"
mv "$HOME/.cargo/bin/cross" .
CROSS_NO_WARNINGS=0 ./cross --version