Skip to content

Commit

Permalink
Pass other_action from the Action
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Sep 27, 2024
1 parent fac739e commit 33bcbb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 33bcbb5

Please sign in to comment.