mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix: support legacy and beta prerelease version formats
This commit is contained in:
@@ -19,7 +19,8 @@ ZIP_NAME=$(basename "$ZIP")
|
||||
ZIP_BASE="${ZIP_NAME%.zip}"
|
||||
VERSION=${SPARKLE_RELEASE_VERSION:-}
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
if [[ "$ZIP_NAME" =~ ^OpenClaw-([0-9]+(\.[0-9]+){1,2}([-.][^.]*)?)\.zip$ ]]; then
|
||||
# Accept legacy calver suffixes like -1 and prerelease forms like -beta.1 / .beta.1.
|
||||
if [[ "$ZIP_NAME" =~ ^OpenClaw-([0-9]+(\.[0-9]+){1,2}([-.][0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?)\.zip$ ]]; then
|
||||
VERSION="${BASH_REMATCH[1]}"
|
||||
else
|
||||
echo "Could not infer version from $ZIP_NAME; set SPARKLE_RELEASE_VERSION." >&2
|
||||
|
||||
Reference in New Issue
Block a user