diff --git a/lib/fastlane/plugin/ddg_apple_automation/actions/start_new_release_action.rb b/lib/fastlane/plugin/ddg_apple_automation/actions/start_new_release_action.rb index 3234800..a6d4e49 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/actions/start_new_release_action.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/actions/start_new_release_action.rb @@ -38,10 +38,10 @@ def self.update_asana_tasks_for_release(params) end def self.create_release_branch(params) - Helper::DdgAppleAutomationHelper.code_freeze_prechecks if Helper.is_ci? + Helper::DdgAppleAutomationHelper.code_freeze_prechecks(other_action) if Helper.is_ci? new_version = Helper::DdgAppleAutomationHelper.validate_new_version(params[:version]) create_release_branch(new_version) - update_embedded_files(params) + update_embedded_files(params, other_action) update_version_config(new_version) other_action.push_to_git_remote Helper::GitHubActionsHelper.set_output("release_branch_name", "#{Helper::DdgAppleAutomationHelper::RELEASE_BRANCH}/#{new_version}") diff --git a/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb b/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb index 0e3d229..15d0dfb 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb @@ -37,13 +37,13 @@ class DdgAppleAutomationHelper ]) }.freeze - def self.code_freeze_prechecks - Actions.ensure_git_status_clean - Actions.ensure_git_branch(branch: DEFAULT_BRANCH) - Actions.git_pull + def self.code_freeze_prechecks(other_action) + other_action.ensure_git_status_clean + other_action.ensure_git_branch(branch: DEFAULT_BRANCH) + other_action.git_pull - Actions.git_submodule_update(recursive: true, init: true) - Actions.ensure_git_status_clean + other_action.git_submodule_update(recursive: true, init: true) + other_action.ensure_git_status_clean end def self.validate_new_version(version) @@ -135,7 +135,7 @@ def self.create_release_branch(version) Actions.sh('git', 'push', '-u', 'origin', release_branch) end - def self.update_embedded_files(params) + def self.update_embedded_files(params, other_action) Actions.sh("cd #{PROJECT_ROOT_FOLDER} && ./scripts/update_embedded.sh") # Verify no unexpected files were modified @@ -156,7 +156,7 @@ def self.update_embedded_files(params) unless modified_files.empty? modified_files.each { |modified_file| sh('git', 'add', modified_file.to_s) } Actions.sh('git', 'commit', '-m', 'Update embedded files') - Actions.ensure_git_status_clean + other_action.ensure_git_status_clean end end