Skip to content

Commit

Permalink
Set shell exportall flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mvitale1989 committed Nov 24, 2023
1 parent 4219e4e commit 9124c3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@ 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 @@ -39,17 +35,14 @@ 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
4 changes: 2 additions & 2 deletions scripts/bump_build_number.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git checkout $BRANCH_TO_BUILD
git pull

log "Generating env file required by Fastlane..."
tee fastlane/.env <<EOF
tee .env <<EOF
export INCREMENT_BUILD_NUMBER=true
export BUILD_NUMBER=${BUILD_NUMBER}
export COMMIT_CHANGES_TO_GIT=true
Expand All @@ -34,7 +34,7 @@ export GIT_LOCAL_BRANCH=${GIT_LOCAL_BRANCH}
EOF

log "Running the fastlane branch generation script"
(cd fastlane && . .env && bundle exec fastlane set_app_build_number)
(set -xa && . .env && cd fastlane && bundle exec fastlane set_app_build_number)

# TODO implement
git branch -l -a

0 comments on commit 9124c3c

Please sign in to comment.