diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8023de5..0904b99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,14 +42,14 @@ jobs: echo '--- scripts/build.mjs (snippet) ---' >&2 sed -n '1,200p' scripts/build.mjs >&2 || true - # Primary extraction: find the first quoted semver (may include prerelease suffix, but we strip it) - raw=$(grep -m1 -oE '\"[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?\"' scripts/build.mjs | tr -d '\"' | head -n1 || true) + # Primary extraction: find the first quoted version (supports major.minor.patch or major.minor.patch.patch formats, may include prerelease suffix) + raw=$(grep -m1 -oE '\"[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9A-Za-z.-]+)?\"' scripts/build.mjs | tr -d '\"' | head -n1 || true) - # Strip any prerelease suffix, keep only major.minor.patch - version=$(printf '%s' "$raw" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/') + # Strip any prerelease suffix, keep only major.minor.patch or major.minor.patch.patch + version=$(printf '%s' "$raw" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*/\1/') - # Validate final result is exactly major.minor.patch - if ! printf '%s' "$version" | grep -xE '^[0-9]+\.[0-9]+\.[0-9]+$' >/dev/null; then + # Validate final result is either major.minor.patch or major.minor.patch.patch + if ! printf '%s' "$version" | grep -xE '^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$' >/dev/null; then echo "Failed to extract a valid base version from scripts/build.mjs" >&2 sed -n '1,200p' scripts/build.mjs >&2 || true exit 1 diff --git a/scripts/build.mjs b/scripts/build.mjs index 6c03b18..2dd3de7 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -75,7 +75,7 @@ const config = { constModules: { globals: { "bunny-build-info": { - version: `"1.4.1"`, + version: `"1.4.1.1"`, }, }, },