Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
fix(versioning): treat empty beta variables and an empty --named as given
Raystormsaab590966896
diff --git a/dylib/tests/versioncheck.sh b/dylib/tests/versioncheck.shindex 04d03ac..230ff87 100644--- a/dylib/tests/versioncheck.sh+++ b/dylib/tests/versioncheck.sh@@ -166,6 +166,10 @@ done# A missing number fails, whatever else is set.expect_refused "no beta number, build given" stamp BRIDGEPLAY_BETA_BUILD=50 checkexpect_refused "no beta number, planned given" stamp BRIDGEPLAY_BETA_PLANNED=0.8.0 check+# Empty values count as set: a wrapper that exports them empty must not get a stable build.+expect_refused "empty beta build, no beta number" stamp BRIDGEPLAY_BETA_BUILD= check+expect_refused "empty planned, no beta number" stamp BRIDGEPLAY_BETA_PLANNED= check+expect_refused "both empty, no beta number" stamp BRIDGEPLAY_BETA_BUILD= BRIDGEPLAY_BETA_PLANNED= check# The build number is given, a positive integer and above the committed build.expect_refused "no beta build" stamp BRIDGEPLAY_BETA=1 check@@ -267,6 +271,7 @@ expect_refused "named differs from the patch" bump patch --named 0.8.0expect_same "a refused bump leaves version.h alone" "$work/version.h.orig" "$bumpfx/dylib/version.h"expect_refused "named differs from the minor" bump minor --named 0.7.3expect_refused "named is malformed" bump patch --named 0.7.3-beta.1+expect_refused "named is empty" bump patch --named "" --highest-build 50expect_refused "no part" bumpexpect_refused "unknown part" bump betadiff --git a/scripts/bump-version.sh b/scripts/bump-version.shindex 01a6491..cea1da9 100755--- a/scripts/bump-version.sh+++ b/scripts/bump-version.sh@@ -51,6 +51,7 @@ while [ $# -gt 0 ]; do;;--named)[ $# -ge 2 ] || usage+ is_semver "$2" || { echo "==> --named wants X.Y.Z, got '$2'" >&2; exit 1; }named=$2shift 2;;@@ -72,9 +73,6 @@ fiif [ -n "$highest" ]; thenis_posint "$highest" || die "--highest-build wants a positive integer, got '$highest'"fi-if [ -n "$named" ]; then- is_semver "$named" || die "--named wants X.Y.Z, got '$named'"-finext=$(semver_next "$part" "$version")[ -z "$named" ] || [ "$named" = "$next" ] \diff --git a/scripts/stamp-beta.sh b/scripts/stamp-beta.shindex e7e990f..b6a18e0 100755--- a/scripts/stamp-beta.sh+++ b/scripts/stamp-beta.sh@@ -62,7 +62,7 @@ if [ -n "${BRIDGEPLAY_BETA+set}" ]; thenversion=$planned-beta.$BRIDGEPLAY_BETAbuild=$beta_buildchannel=beta-elif [ -n "${BRIDGEPLAY_BETA_BUILD:-}" ] || [ -n "${BRIDGEPLAY_BETA_PLANNED:-}" ]; then+elif [ -n "${BRIDGEPLAY_BETA_BUILD+set}" ] || [ -n "${BRIDGEPLAY_BETA_PLANNED+set}" ]; thendie "BRIDGEPLAY_BETA_BUILD or BRIDGEPLAY_BETA_PLANNED is set without BRIDGEPLAY_BETA (the beta number N)"fi