Skip to content

Commit

Permalink
🔀️ Merge branch 'ladislas/bugfix/fatlane-bundle-length'
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Apr 11, 2024
2 parents 8f48956 + a973ac3 commit 8e021f3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ platform :ios do
pr_number = ENV.fetch('PR_NUMBER', `gh pr view --json number -q .number`.strip)
last_commit_sha_to_int = last_git_commit[:abbreviated_commit_hash].to_i(16)

next_build_number = "#{next_build_number_major}.#{pr_number or '000'}.#{last_commit_sha_to_int}"
next_build_number = "#{next_build_number_major}.#{pr_number or '000'}.#{last_commit_sha_to_int}".slice(0, 18)
version_number = get_version_number(xcodeproj: app_xcodeproj.to_s)

UI.important "App: #{app} / Version number: #{version_number} / Build number: #{next_build_number}"
Expand Down Expand Up @@ -294,28 +294,28 @@ platform :ios do
end

latest_build_number = latest_testflight_build_number(app_identifier: app_id.to_s).to_s
next_build_number = latest_build_number.split('.').first.to_i + 1
next_build_number_major = latest_build_number.split('.').first.to_i + 1
pr_number = ENV.fetch('PR_NUMBER', `gh pr view --json number -q .number`.strip)
last_commit_sha_to_int = last_git_commit[:abbreviated_commit_hash].to_i(16)

build_number = "#{next_build_number}.#{pr_number or '000'}.#{last_commit_sha_to_int}"
next_build_number = "#{next_build_number_major}.#{pr_number or '000'}.#{last_commit_sha_to_int}".slice(0, 18)
version_number = get_version_number(xcodeproj: app_xcodeproj.to_s)

UI.important "App: #{app} / Version number: #{version_number} / Build number: #{build_number}"
UI.important "App: #{app} / Version number: #{version_number} / Build number: #{next_build_number}"
UI.important "Metadata path: #{ROOT_DIR}/fastlane/release/#{app}/metadata"

# capture_screenshots # ? not working yet

increment_build_number(
build_number: build_number,
build_number: next_build_number,
xcodeproj: app_xcodeproj.to_s
)

build_app(
workspace: 'ios-monorepo.xcworkspace',
scheme: app,
output_directory: './.build',
output_name: "#{build_date}-#{app}-v#{version_number}-#{build_number}"
output_name: "#{build_date}-#{app}-v#{version_number}-#{next_build_number}"
)

upload_to_app_store(
Expand Down

0 comments on commit 8e021f3

Please sign in to comment.