From dcd54b31a7f35fbb36052ac8222ea99e7531b62b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 15 May 2026 09:20:42 -0700
Subject: [PATCH] test-versioning.sh: check Xcode project MARKETING_VERSION
---
build-scripts/test-versioning.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/build-scripts/test-versioning.sh b/build-scripts/test-versioning.sh
index df80748fc..790fd502f 100755
--- a/build-scripts/test-versioning.sh
+++ b/build-scripts/test-versioning.sh
@@ -92,6 +92,17 @@ else
not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_image.h $ref_version"
fi
+marketing=$(sed -Ene 's/.*MARKETING_VERSION = (.*);/\1/p' Xcode/SDL_image.xcodeproj/project.pbxproj)
+
+ref="$ref_version
+$ref_version"
+
+if [ "$ref" = "$marketing" ]; then
+ ok "project.pbxproj MARKETING_VERSION is consistent"
+else
+ not_ok "project.pbxproj MARKETING_VERSION is inconsistent, expected $ref, got $marketing"
+fi
+
# For simplicity this assumes we'll never break ABI before SDL 3.
dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL_image.xcodeproj/project.pbxproj)