Skip to content

Commit

Permalink
Debug Fastfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mvitale1989 committed Nov 24, 2023
1 parent 6c844f8 commit 4219e4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ is_build_pr = false
before_all do
ENV['SPACESHIP_SKIP_2FA_UPGRADE'] = '1'

UI.success("breakpoint1")
is_build_pr = ENV['BUILD_PR'] == 'true'
if is_build_pr && ENV['CI'] == 'true'
ENV['BRANCH_TO_BUILD'] = ENV['GITHUB_REF_NAME']
end

UI.success("breakpoint2")
if ENV['CI'] != 'true'
UI.success("breakpoint3")
# Raises an error is git is not clean
if ENV['COMMIT_CHANGES_TO_GIT'] == 'true'
ensure_git_status_clean
end

UI.success("breakpoint4")
# Block to ensure we are on the right branch
branch = ENV['BRANCH_TO_BUILD'] || ENV['GIT_BRANCH']
begin
Expand All @@ -35,14 +39,17 @@ before_all do
UI.success("Using branch \"#{branch}\"")
end

UI.success("breakpoint5")
# If we are going to commit changes to git create a separate branch
# so no changes are done in the branch that is being built
if ENV['COMMIT_CHANGES_TO_GIT'] == 'true'
local_branch = ENV['GIT_LOCAL_BRANCH'] || 'build'
sh "git checkout -b #{local_branch}"
UI.success("Creating branch \"#{local_branch}\"")
end
UI.success("breakpoint6")
end
UI.success("breakpoint7")
end

after_all do |lane|
Expand Down

0 comments on commit 4219e4e

Please sign in to comment.