Skip to content

Commit

Permalink
Fix pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmassel committed Oct 31, 2024
1 parent 7ba586c commit ef44dbd
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source 'https://cdn.cocoapods.org/'

raise 'Please run CocoaPods via `bundle exec`' unless %w[BUNDLE_BIN_PATH BUNDLE_GEMFILE].any? { |k| ENV.key?(k) }

VERSION_XCCONFIG_PATH = File.join(File.expand_path(__dir__), 'config', 'Common.xcconfig')
VERSION_XCCONFIG_PATH = File.join(File.expand_path(__dir__), 'WordPress', 'Config', 'Common.xcconfig')
APP_IOS_DEPLOYMENT_TARGET = Gem::Version.new(Xcodeproj::Config.new(VERSION_XCCONFIG_PATH).to_hash['IPHONEOS_DEPLOYMENT_TARGET'])

platform :ios, APP_IOS_DEPLOYMENT_TARGET.version
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ SPEC CHECKSUMS:
WordPress-Aztec-iOS: 3732c6d865a5c9f35788377bdeda8a80ea10d0a1
WordPress-Editor-iOS: 453345420ced3d3ef20f0051b3df46ff10281e0c

PODFILE CHECKSUM: 99aff5ecb96391804fd8f28b29fd4e350ecd4b2e
PODFILE CHECKSUM: 1e0680605a463116265bb3ccf558739d3ae62a0a

COCOAPODS: 1.16.1
20 changes: 18 additions & 2 deletions WordPress/WordPress.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,8 @@
};
24F66C5E2CD3FE1700AAB1A3 /* JetpackDraftActionExtension */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
path = JetpackDraftActionExtension;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -1681,11 +1683,15 @@
};
24F6943B2CD406FE00AAB1A3 /* Shared */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
path = Shared;
sourceTree = "<group>";
};
24F694542CD4075000AAB1A3 /* Config */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
path = Config;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -1750,11 +1756,15 @@
};
24F6E6DD2CD3F6C000AAB1A3 /* JetpackNotificationServiceExtension */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
path = JetpackNotificationServiceExtension;
sourceTree = "<group>";
};
24F6E6E12CD3F6C200AAB1A3 /* JetpackShareExtension */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
path = JetpackShareExtension;
sourceTree = "<group>";
};
Expand All @@ -1768,6 +1778,8 @@
};
24F6E6E82CD3F6F500AAB1A3 /* Credentials */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
);
path = Credentials;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -2023,7 +2035,7 @@
path = Classes;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
29B97314FDCFA39411CA2CEA = {
isa = PBXGroup;
children = (
24F694542CD4075000AAB1A3 /* Config */,
Expand Down Expand Up @@ -2797,7 +2809,7 @@
bg,
sk,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
mainGroup = 29B97314FDCFA39411CA2CEA;
preferredProjectObjectVersion = 77;
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -7056,6 +7068,7 @@
};
FABB264E2602FC2C00C8785C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 152F25D5C232985E30F56CAC /* Pods-Apps-Jetpack.debug.xcconfig */;
baseConfigurationReferenceAnchor = 24F694542CD4075000AAB1A3 /* Config */;
baseConfigurationReferenceRelativePath = Jetpack.debug.xcconfig;
buildSettings = {
Expand Down Expand Up @@ -7125,6 +7138,7 @@
};
FABB264F2602FC2C00C8785C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 011A2815DB0DE7E3973CBC0E /* Pods-Apps-Jetpack.release.xcconfig */;
baseConfigurationReferenceAnchor = 24F694542CD4075000AAB1A3 /* Config */;
baseConfigurationReferenceRelativePath = Jetpack.release.xcconfig;
buildSettings = {
Expand Down Expand Up @@ -7191,6 +7205,7 @@
};
FABB26502602FC2C00C8785C /* Release-Internal */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 67832AB9D81652460A80BE66 /* Pods-Apps-Jetpack.release-internal.xcconfig */;
baseConfigurationReferenceAnchor = 24F694542CD4075000AAB1A3 /* Config */;
baseConfigurationReferenceRelativePath = Jetpack.internal.xcconfig;
buildSettings = {
Expand Down Expand Up @@ -7257,6 +7272,7 @@
};
FABB26512602FC2C00C8785C /* Release-Alpha */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 150B6590614A28DF9AD25491 /* Pods-Apps-Jetpack.release-alpha.xcconfig */;
baseConfigurationReferenceAnchor = 24F694542CD4075000AAB1A3 /* Config */;
baseConfigurationReferenceRelativePath = Jetpack.alpha.xcconfig;
buildSettings = {
Expand Down
4 changes: 2 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Dotenv.load(USER_ENV_FILE_PATH)
Dotenv.load(PROJECT_ENV_FILE_PATH)
GITHUB_REPO = 'wordpress-mobile/wordpress-iOS'
DEFAULT_BRANCH = 'trunk'
PUBLIC_CONFIG_FILE = File.join(PROJECT_ROOT_FOLDER, 'config', 'Version.public.xcconfig')
INTERNAL_CONFIG_FILE = File.join(PROJECT_ROOT_FOLDER, 'config', 'Version.internal.xcconfig')
PUBLIC_CONFIG_FILE = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Config', 'Version.public.xcconfig')
INTERNAL_CONFIG_FILE = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Config', 'Version.internal.xcconfig')
ENV['FASTLANE_WWDR_USE_HTTP1_AND_RETRIES'] = 'true'

# Fastlane's `git_branch` action and its relevant helpers use environment variables to modify the output.
Expand Down
5 changes: 2 additions & 3 deletions fastlane/lanes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,12 @@ def build_and_upload_prototype_build(scheme:, output_app_name:, appcenter_app_na
configuration = 'Release-Alpha'

# Get the current build version, and update it if needed
version_config_path = File.join(PROJECT_ROOT_FOLDER, 'config', 'Version.internal.xcconfig')
versions = Xcodeproj::Config.new(File.new(version_config_path)).to_hash
versions = Xcodeproj::Config.new(File.new(INTERNAL_CONFIG_FILE)).to_hash
build_number = generate_prototype_build_number
UI.message("Updating build version to #{build_number}")
versions['VERSION_LONG'] = build_number
new_config = Xcodeproj::Config.new(versions)
new_config.save_as(Pathname.new(version_config_path))
new_config.save_as(Pathname.new(INTERNAL_CONFIG_FILE))

# Build
build_app(
Expand Down

0 comments on commit ef44dbd

Please sign in to comment.