[go: nahoru, domu]

Skip to content

Commit

Permalink
Add build_version parameter to upload_gutenberg_sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Mar 7, 2024
1 parent 8485001 commit ab4fc3e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fastlane/lanes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
build_bundle(app: app, version_name: version_name, build_code: current_build_code, flavor: flavor, buildType: build_type)

upload_build_to_play_store(app: app, version_name: version_name, track: 'production')
upload_gutenberg_sourcemaps(app: app, flavor: flavor, build_type: build_type, release_version: version_name)
upload_gutenberg_sourcemaps(app: app, flavor: flavor, build_type: build_type, release_version: version_name, build_version: current_build_code)

create_gh_release(app: app, version_name: version_name) if options[:create_release]
end
Expand Down Expand Up @@ -110,7 +110,7 @@
build_bundle(app: app, version_name: version_name, build_code: current_build_code, flavor: flavor, buildType: build_type)

upload_build_to_play_store(app: app, version_name: version_name, track: 'beta') if options[:upload_to_play_store]
upload_gutenberg_sourcemaps(app: app, flavor: flavor, build_type: build_type, release_version: version_name)
upload_gutenberg_sourcemaps(app: app, flavor: flavor, build_type: build_type, release_version: version_name, build_version: current_build_code)

create_gh_release(app: app, version_name: version_name, prerelease: true) if options[:create_release]
end
Expand Down Expand Up @@ -223,7 +223,7 @@
)

upload_prototype_build(product: 'WordPress', version_name: version_name)
upload_gutenberg_sourcemaps(app: 'Wordpress', flavor: PROTOTYPE_BUILD_FLAVOR, build_type: PROTOTYPE_BUILD_TYPE, release_version: version_name)
upload_gutenberg_sourcemaps(app: 'Wordpress', flavor: PROTOTYPE_BUILD_FLAVOR, build_type: PROTOTYPE_BUILD_TYPE, release_version: version_name, build_version: current_build_code)
end

#####################################################################################
Expand All @@ -247,7 +247,7 @@
)

upload_prototype_build(product: 'Jetpack', version_name: version_name)
upload_gutenberg_sourcemaps(app: 'Jetpack', flavor: PROTOTYPE_BUILD_FLAVOR, build_type: PROTOTYPE_BUILD_TYPE, release_version: version_name)
upload_gutenberg_sourcemaps(app: 'Jetpack', flavor: PROTOTYPE_BUILD_FLAVOR, build_type: PROTOTYPE_BUILD_TYPE, release_version: version_name, build_version: current_build_code)
end

#####################################################################################
Expand Down Expand Up @@ -376,7 +376,7 @@ def generate_prototype_build_number
# @param [String] build_type Build type, e.g. 'Debug' or 'Release'.
# @param [String] release_version Release version name to attach the files to in Sentry.
#
def upload_gutenberg_sourcemaps(app:, flavor:, build_type:, release_version:)
def upload_gutenberg_sourcemaps(app:, flavor:, build_type:, release_version:, build_version:)
# Load Sentry properties
sentry_path = File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'src', app.downcase, 'sentry.properties')
sentry_properties = JavaProperties.load(sentry_path)
Expand All @@ -400,6 +400,7 @@ def upload_gutenberg_sourcemaps(app:, flavor:, build_type:, release_version:)
org_slug: org_slug,
project_slug: project_slug,
version: release_version,
dist: build_version,
# When the React native bundle is generated, the source map file references include the local machine path;
# With the `rewrite` and `strip_common_prefix` options, Sentry automatically strips this part.
rewrite: true,
Expand Down

0 comments on commit ab4fc3e

Please sign in to comment.