diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 680dd870bd7..cde74f65676 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -11,6 +11,7 @@ common_params: repo: "automattic/woocommerce-ios/" # Common environment values to use with the `env` key. - &common_env + # Be sure to also update the `.xcode-version` file when updating the Xcode image/version here IMAGE_ID: xcode-14 # This is the default pipeline – it will build and test the app diff --git a/.buildkite/release-builds.yml b/.buildkite/release-builds.yml index 63846500a9b..4292a1a4023 100644 --- a/.buildkite/release-builds.yml +++ b/.buildkite/release-builds.yml @@ -13,6 +13,7 @@ common_params: repo: "automattic/woocommerce-ios/" # Common environment values to use with the `env` key. - &common_env + # Be sure to also update the `.xcode-version` file when updating the Xcode image/version here IMAGE_ID: xcode-14 steps: diff --git a/.xcode-version b/.xcode-version new file mode 100644 index 00000000000..1579e43e8bb --- /dev/null +++ b/.xcode-version @@ -0,0 +1 @@ +~> 14.0 diff --git a/.xcversion b/.xcversion deleted file mode 100644 index f0750610b36..00000000000 --- a/.xcversion +++ /dev/null @@ -1 +0,0 @@ -13.0 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6ef061f899c..a6465e46f7d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -444,8 +444,11 @@ platform :ios do lane :build_and_upload_itc do |options| ensure_sentry_installed - ios_build_prechecks(skip_confirm: options[:skip_confirm], external: true) unless options[:skip_prechecks] - ios_build_preflight unless options[:skip_prechecks] + unless options[:skip_prechecks] + ios_build_prechecks(skip_confirm: options[:skip_confirm], external: true) + ios_build_preflight + xcversion() # Ensure we're using the right version of Xcode, defined in `.xcode-version` file + end appstore_code_signing @@ -501,6 +504,7 @@ platform :ios do desc 'Builds and uploads an installable build' lane :build_and_upload_installable_build do ensure_sentry_installed + xcversion() # Ensure we're using the right version of Xcode, defined in `.xcode-version` file alpha_code_signing @@ -577,6 +581,8 @@ platform :ios do ##################################################################################### desc 'Build for Testing' lane :build_for_testing do |options| + xcversion() # Ensure we're using the right version of Xcode, defined in `.xcode-version` file + run_tests( workspace: 'WooCommerce.xcworkspace', scheme: TEST_SCHEME, @@ -649,8 +655,8 @@ platform :ios do # Ensure we're using the latest Pods sh('bundle exec pod install --verbose') - # Ensure we're using the right version of Xcode - xcversion(version: '~> 13.4') + # Ensure we're using the right version of Xcode, defined in `.xcode-version` file + xcversion() scan( workspace: 'WooCommerce.xcworkspace', @@ -662,8 +668,8 @@ platform :ios do desc 'Take Screenshots' lane :take_screenshots do |options| - # Ensure we're using the right version of Xcode - xcversion(version: '~> 13.4') + # Ensure we're using the right version of Xcode, defined in `.xcode-version` file + xcversion() # By default, clear previous screenshots languages = IOS_LOCALES