INNER CODE UNIT · Ruby

upload_gutenberg_sourcemaps

wordpress-mobile/WordPress-Android · fastlane/lanes/build.rb:456

  def upload_gutenberg_sourcemaps(app:, release_version:)
    # Load Sentry properties
    sentry_path = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'src', app.downcase, 'sentry.properties')
    sentry_properties = JavaProperties.load(sentry_path)
    project_slug = sentry_properties[:'defaults.project']
    org_slug = sentry_properties[:'defaults.org']

    # Bundle and source map files are copied to a specific folder as part of the build process.
    bundle_source_map_path = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'build', 'react-native-bundle-source-map')
    UI.user_error!("Missing source maps: #{bundle_source_map_path}") unless File.directory?(bundle_source_map_path)

    sentry_upload_sourcemap(
      auth_token: get_required_env('SENTRY_AUTH_TOKEN'),
      org_slug: org_slug,
      project_slug: project_slug,
      version: release_version,
      dist: current_build_code,
      # When the React native bundle is generated, the source map file references include the local machine path;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…