diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 25a5fbb..d768cbe 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -228,12 +228,15 @@ end lane :validate_public_interface do next unless is_check_required(sources: sources_matrix[:public_interface], force_check: @force_check) - # Run the analysis on the current branch + # Get branch names original_branch = current_branch + target_branch = ENV['GITHUB_BASE_REF'] || (original_branch.include?('release/') ? 'main' : 'develop') + UI.important("Target branch: #{target_branch} 🕊️") + + # Run the analysis on the current branch sh('interface-analyser analysis ../Sources/ public_interface_current.json') # Checkout the target branch - target_branch = original_branch.include?('release/') ? 'main' : 'develop' sh("git fetch origin #{target_branch}") sh("git checkout #{target_branch}")