Keep the app version in project.yml so XcodeGen can't reset it
project.yml declared `info: path: TopManager/Info.plist` without
properties, so every `xcodegen generate` rewrote Info.plist with
XcodeGen's defaults, 1.0 (1). That silently undid the version bump in
cf88044: its message says 1.1.1 (3), but the commit actually set
Info.plist back to 1.0 (1).
The version now lives in MARKETING_VERSION / CURRENT_PROJECT_VERSION in
project.yml, and the generated Info.plist references them. Regenerating
is idempotent and the built app reports 1.1.1 (3).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -453,12 +453,14 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = TopManager/TopManager.entitlements;
|
CODE_SIGN_ENTITLEMENTS = TopManager/TopManager.entitlements;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = 3;
|
||||||
GENERATE_INFOPLIST_FILE = NO;
|
GENERATE_INFOPLIST_FILE = NO;
|
||||||
INFOPLIST_FILE = TopManager/Info.plist;
|
INFOPLIST_FILE = TopManager/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 1.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.topmanager.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.topmanager.app;
|
||||||
PRODUCT_NAME = TopManager;
|
PRODUCT_NAME = TopManager;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
@@ -556,12 +558,14 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = TopManager/TopManager.entitlements;
|
CODE_SIGN_ENTITLEMENTS = TopManager/TopManager.entitlements;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = 3;
|
||||||
GENERATE_INFOPLIST_FILE = NO;
|
GENERATE_INFOPLIST_FILE = NO;
|
||||||
INFOPLIST_FILE = TopManager/Info.plist;
|
INFOPLIST_FILE = TopManager/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 1.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.topmanager.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.topmanager.app;
|
||||||
PRODUCT_NAME = TopManager;
|
PRODUCT_NAME = TopManager;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -31,8 +31,15 @@ targets:
|
|||||||
GENERATE_INFOPLIST_FILE: NO
|
GENERATE_INFOPLIST_FILE: NO
|
||||||
SWIFT_EMIT_LOC_STRINGS: YES
|
SWIFT_EMIT_LOC_STRINGS: YES
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
||||||
|
# The app version lives here. `xcodegen generate` rewrites Info.plist from
|
||||||
|
# the `info` block below, so a version typed into Info.plist gets reset.
|
||||||
|
MARKETING_VERSION: "1.1.1"
|
||||||
|
CURRENT_PROJECT_VERSION: "3"
|
||||||
info:
|
info:
|
||||||
path: TopManager/Info.plist
|
path: TopManager/Info.plist
|
||||||
|
properties:
|
||||||
|
CFBundleShortVersionString: $(MARKETING_VERSION)
|
||||||
|
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
|
||||||
|
|
||||||
TopManagerTests:
|
TopManagerTests:
|
||||||
type: bundle.unit-test
|
type: bundle.unit-test
|
||||||
|
|||||||
Reference in New Issue
Block a user