diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa211785..26acbe613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ ### Breaking Changes -_None_ +- The `ios_build_preflight` and `android_build_preflight` actions have been removed. [#773] ### New Features diff --git a/MIGRATION.md b/MIGRATION.md index 78ec06f49..894c88369 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,5 +1,9 @@ # Migration Instructions for Major Releases +## From 14.x to 15.0.0 + +- Remove calls to `ios_build_preflight` and `android_build_preflight` actions from your Fastfiles as they've been removed. They also applied legacy `.configure` secrets and ran dependency/tool checks, so you need to preserve any behavior your project still needs explicitly. + ## From 13.x to 14.0.0 ### Metadata Source Actions diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb deleted file mode 100644 index 56db305e2..000000000 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -module Fastlane - module Actions - class AndroidBuildPreflightAction < Action - def self.run(params) - # Validate mobile configuration secrets - other_action.configure_apply - - # Check gems and pods are up to date. This will exit if it fails - begin - Action.sh('bundle check') - rescue StandardError - UI.user_error!("You should run 'bundle install' to make sure gems are up to date") - raise - end - - begin - Action.sh('command -v bundletool > /dev/null') - rescue StandardError - UI.user_error!("bundletool is required to build the APKs. Install it with 'brew install bundletool'") - raise - end - end - - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - 'Clean the environment to ensure a safe build' - end - - def self.details - 'Clean the environment to ensure a safe build' - end - - def self.available_options - end - - def self.output - end - - def self.return_value - end - - def self.authors - ['Automattic'] - end - - def self.is_supported?(platform) - platform == :android - end - end - end -end diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb deleted file mode 100644 index 170402683..000000000 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -module Fastlane - module Actions - class IosBuildPreflightAction < Action - def self.run(params) - # Validate mobile configuration secrets - other_action.configure_apply - - Action.sh("cd .. && rm -rf #{params[:derived_data_path]}") - - # Verify that ImageMagick exists on this machine and can be called from the command-line. - # Internal Builds use it to generate the App Icon as part of the build process - begin - Action.sh('which convert') - rescue StandardError - UI.user_error!("Couldn't find ImageMagick. Please install it by running `brew install imagemagick`") - raise - end - - # Verify that Ghostscript exists on this machine and can be called from the command-line. - # Internal Builds use it to generate the App Icon as part of the build process - begin - Action.sh('which gs') - rescue StandardError - UI.user_error!("Couldn't find Ghostscript. Please install it by running `brew install ghostscript`") - raise - end - - # Check gems and pods are up to date. This will exit if it fails - begin - Action.sh('bundle check') - rescue StandardError - UI.user_error!("You should run 'rake dependencies' to make sure gems are up to date") - raise - end - - other_action.cocoapods - end - - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - 'Clean the environment to ensure a safe build' - end - - def self.details - 'Clean the environment to ensure a safe build' - end - - def self.available_options - [ - FastlaneCore::ConfigItem.new( - key: :derived_data_path, - description: "The path to the DerivedData directory for the project. Should match what's used in the `gym` action", - type: String, - default_value: '~/Library/Developer/Xcode/DerivedData' - ), - ] - end - - def self.output - end - - def self.return_value - end - - def self.authors - ['Automattic'] - end - - def self.is_supported?(platform) - %i[ios mac].include?(platform) - end - end - end -end