Update SDL info and Xcode marketing version with version update scripts

This commit is contained in:
Sam Lantinga 2022-11-22 09:18:05 -08:00
parent ea8f8b6dc3
commit 44975d40ef
2 changed files with 25 additions and 0 deletions

View file

@ -4,6 +4,8 @@
set -eu
cd `dirname $0`/..
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
@ -139,6 +141,25 @@ else
not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_version.h $ref_version"
fi
version=$(sed -Ene 's/Title SDL (.*)/\1/p' Xcode/SDL/pkg-support/SDL.info)
if [ "$ref_version" = "$version" ]; then
ok "SDL.info Title $version"
else
not_ok "SDL.info Title $version disagrees with SDL_version.h $ref_version"
fi
marketing=$(sed -Ene 's/.*MARKETING_VERSION = (.*);/\1/p' Xcode/SDL/SDL.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/SDL.xcodeproj/project.pbxproj)

View file

@ -30,6 +30,10 @@ echo "Updating version to '$NEWVERSION' ..."
# !!! FIXME: This first one is a kinda scary search/replace that might fail later if another X.Y.Z version is added to the file.
perl -w -pi -e 's/(\<string\>)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/Info-Framework.plist
perl -w -pi -e 's/(Title SDL )\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/pkg-support/SDL.info
perl -w -pi -e 's/(MARKETING_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
DYVER=`expr $MINOR \* 100 + 1`
perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj