Skip to content

Commit

Permalink
Address dangermattic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Mar 7, 2024
1 parent f2791d6 commit 3f5b7cb
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions fastlane/lanes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
build_version: build_code_current_internal,
app_identifier: 'org.wordpress.internal'
)

end

# Builds the WordPress app for a Prototype Build ("WordPress Alpha" scheme), and uploads it to App Center
Expand Down Expand Up @@ -358,6 +358,7 @@ def generate_prototype_build_number
# Builds a Prototype Build for WordPress or Jetpack, then uploads it to App Center and comment with a link to it on the PR.
#
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/ParameterLists
def build_and_upload_prototype_build(scheme:, output_app_name:, appcenter_app_name:, app_icon:, sentry_project_slug:, app_identifier:)
configuration = 'Release-Alpha'

Expand Down Expand Up @@ -410,10 +411,10 @@ def build_and_upload_prototype_build(scheme:, output_app_name:, appcenter_app_na
)

upload_gutenberg_sourcemaps(
sentry_project_slug: sentry_project_slug,
sentry_project_slug:,
release_version: release_version_current,
build_version: build_number,
app_identifier: app_identifier
app_identifier:
)

# Post PR Comment
Expand Down Expand Up @@ -498,10 +499,10 @@ def upload_build_to_app_center(

def upload_gutenberg_sourcemaps(sentry_project_slug:, release_version:, build_version:, app_identifier:)
# The bundle and source map files are the same for all architectures.
gutenberg_bundle = File.join(PROJECT_ROOT_FOLDER, "Pods/Gutenberg/Frameworks/Gutenberg.xcframework/ios-arm64/Gutenberg.framework")
gutenberg_bundle = File.join(PROJECT_ROOT_FOLDER, 'Pods/Gutenberg/Frameworks/Gutenberg.xcframework/ios-arm64/Gutenberg.framework')

Dir.mktmpdir do |sourcemaps_folder|
# It's important that the bundle and source map files have specific names, otherwise, Sentry
# It's important that the bundle and source map files have specific names, otherwise, Sentry
# won't symbolicate the stack traces.
FileUtils.cp(File.join(gutenberg_bundle, 'App.js'), File.join(sourcemaps_folder, 'main.jsbundle'))
FileUtils.cp(File.join(gutenberg_bundle, 'App.composed.js.map'), File.join(sourcemaps_folder, 'main.jsbundle.map'))
Expand All @@ -512,8 +513,8 @@ def upload_gutenberg_sourcemaps(sentry_project_slug:, release_version:, build_ve
# - Build version
# This conforms to the following format: <app_identifier>@<release_version>+<build_version>
# Here are a couple of examples:
# - Prototype build: [email protected]+pr22654-07765b3 
# - App Store build: [email protected]+24.1.0.3
# - Prototype build: [email protected]+pr22654-07765b3
# - App Store build: [email protected]+24.1.0.3

sentry_upload_sourcemap(
auth_token: get_required_env('SENTRY_AUTH_TOKEN'),
Expand All @@ -522,9 +523,9 @@ def upload_gutenberg_sourcemaps(sentry_project_slug:, release_version:, build_ve
version: release_version,
dist: build_version,
build: build_version,
app_identifier: app_identifier,
app_identifier:,
# When the React native bundle is generated, the source map file references
# include the local machine path, with the `rewrite` and `strip_common_prefix`
# include the local machine path, with the `rewrite` and `strip_common_prefix`
# options Sentry automatically strips this part.
rewrite: true,
strip_common_prefix: true,
Expand Down

0 comments on commit 3f5b7cb

Please sign in to comment.