ios: stamp release version into XcodeGen spec
All checks were successful
TestFlight / testflight (push) Successful in 1m43s
All checks were successful
TestFlight / testflight (push) Successful in 1m43s
This commit is contained in:
@@ -24,7 +24,7 @@ targets:
|
||||
GENERATE_INFOPLIST_FILE: YES
|
||||
INFOPLIST_FILE: Apps/Sybil/Info.plist
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
||||
MARKETING_VERSION: "1.10"
|
||||
MARKETING_VERSION: "1.13.2"
|
||||
CURRENT_PROJECT_VERSION: 11
|
||||
INFOPLIST_KEY_CFBundleDisplayName: Sybil
|
||||
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption: NO
|
||||
|
||||
@@ -12,6 +12,7 @@ CI_KEYCHAIN_DB_PATH = File.expand_path("~/Library/Keychains/#{CI_KEYCHAIN_NAME}-
|
||||
IOS_ROOT = File.expand_path("..", __dir__)
|
||||
PROJECT_FILE = File.join(IOS_ROOT, "Sybil.xcodeproj")
|
||||
PROJECT_SPEC = File.join(IOS_ROOT, "project.yml")
|
||||
APP_PROJECT_SPEC = File.join(IOS_ROOT, "Apps/Sybil/project.yml")
|
||||
|
||||
def present?(value)
|
||||
!value.to_s.strip.empty?
|
||||
@@ -49,6 +50,17 @@ def build_number
|
||||
value.to_i
|
||||
end
|
||||
|
||||
def stamp_marketing_version(version)
|
||||
contents = File.read(APP_PROJECT_SPEC)
|
||||
updated = contents.sub(/^(\s*MARKETING_VERSION:\s*).*/, "\\1\"#{version}\"")
|
||||
|
||||
if updated == contents
|
||||
UI.user_error!("Could not find MARKETING_VERSION in #{APP_PROJECT_SPEC}")
|
||||
end
|
||||
|
||||
File.write(APP_PROJECT_SPEC, updated)
|
||||
end
|
||||
|
||||
platform :ios do
|
||||
private_lane :app_store_api_key do
|
||||
app_store_connect_api_key(
|
||||
@@ -104,9 +116,11 @@ platform :ios do
|
||||
|
||||
api_key = app_store_api_key
|
||||
|
||||
version = release_version
|
||||
stamp_marketing_version(version)
|
||||
sh("xcodegen", "--spec", PROJECT_SPEC)
|
||||
|
||||
increment_version_number(version_number: release_version, xcodeproj: PROJECT_FILE)
|
||||
increment_version_number(version_number: version, xcodeproj: PROJECT_FILE)
|
||||
increment_build_number(build_number: build_number, xcodeproj: PROJECT_FILE)
|
||||
|
||||
sync_signing(api_key: api_key, readonly: true)
|
||||
|
||||
Reference in New Issue
Block a user