From 554d4db94d17911b0fc07306f764d7af5c5358a6 Mon Sep 17 00:00:00 2001 From: Kieran Date: Thu, 21 Nov 2024 22:31:53 +1100 Subject: [PATCH] add bundle install --- .../actions/start_new_release_action.rb | 2 +- .../helper/ddg_apple_automation_helper.rb | 2 +- spec/ddg_apple_automation_helper_spec.rb | 1 + spec/start_new_release_action_spec.rb | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) 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 f99136e..f5fccf8 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 @@ -75,7 +75,7 @@ def self.available_options type: String), FastlaneCore::ConfigItem.new(key: :target_section_id, description: "Section ID in Asana where tasks included in the release should be moved", - optional: false, + optional: true, type: String), FastlaneCore::ConfigItem.new(key: :is_hotfix, description: "Is this a hotfix release?", 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 829084d..c044763 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 @@ -157,12 +157,12 @@ def self.create_hotfix_branch(platform, source_version, new_version) Actions.sh("gh", "api", "--method", "POST", "/repos/#{repo}/git/refs", "-f", "ref=refs/heads/#{branch_name}", "-f", "sha=#{sha}") Actions.sh("git", "fetch", "origin") Actions.sh("git", "checkout", branch_name) + Actions.sh("bundle", "install") else Actions.sh("git", "fetch", "--tags") Actions.sh("git", "checkout", "-b", branch_name, source_version) Actions.sh("git", "push", "-u", "origin", branch_name) end - branch_name end diff --git a/spec/ddg_apple_automation_helper_spec.rb b/spec/ddg_apple_automation_helper_spec.rb index f0f2e21..2b40a78 100644 --- a/spec/ddg_apple_automation_helper_spec.rb +++ b/spec/ddg_apple_automation_helper_spec.rb @@ -177,6 +177,7 @@ def load_file(file) ) allow(Fastlane::Actions).to receive(:sh).with("git", "fetch", "origin") allow(Fastlane::Actions).to receive(:sh).with("git", "checkout", branch_name) + allow(Fastlane::Actions).to receive(:sh).with("bundle", "install") result = Fastlane::Helper::DdgAppleAutomationHelper.create_hotfix_branch(platform, source_version, new_version) diff --git a/spec/start_new_release_action_spec.rb b/spec/start_new_release_action_spec.rb index 4a04f17..22c64ff 100644 --- a/spec/start_new_release_action_spec.rb +++ b/spec/start_new_release_action_spec.rb @@ -64,7 +64,7 @@ it 'creates a release task in Asana' do subject - expect(Fastlane::Helper::AsanaHelper).to have_received(:create_release_task).with("ios", "1.1.0", "user", "secret-token", false) + expect(Fastlane::Helper::AsanaHelper).to have_received(:create_release_task).with("ios", "1.1.0", "user", "secret-token", { is_hotfix: false }) end it 'updates Asana tasks for internal release' do @@ -101,7 +101,7 @@ it 'creates a release task in Asana' do subject - expect(Fastlane::Helper::AsanaHelper).to have_received(:create_release_task).with("macos", "1.1.0", "user", "secret-token", false) + expect(Fastlane::Helper::AsanaHelper).to have_received(:create_release_task).with("macos", "1.1.0", "user", "secret-token", { is_hotfix: false }) end it 'updates Asana tasks for internal release' do @@ -147,7 +147,7 @@ it "creates a hotfix release task in Asana" do subject expect(Fastlane::Helper::AsanaHelper).to have_received(:create_release_task) - .with("macos", "1.0.1", "user", "secret-token", true) + .with("macos", "1.0.1", "user", "secret-token", { is_hotfix: true }) end it "does not update Asana tasks for internal release" do