Skip to content

Commit 6fd1862

Browse files
committed
Upload source map artifact during JS bundle generation
1 parent 2afe0f4 commit 6fd1862

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

.buildkite/commands/publish-react-native-bridge-android-artifacts.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55
# Retrieve data from previous steps
66
PUBLISHED_AZTEC_VERSION=`buildkite-agent meta-data get "PUBLISHED_REACT_NATIVE_AZTEC_ANDROID_VERSION"`
77
buildkite-agent artifact download bundle/android/App.js .
8+
buildkite-agent artifact download bundle/android/App.composed.js.map .
89

910
# Copy the JavaScript bundle and all local static assets referenced within the
1011
# bundle to the appropriate locations for inclusion in the bridge bundle

.buildkite/commands/publish-react-native-ios-artifacts.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
echo "--- :arrow_down: Download iOS JS bundle"
44
buildkite-agent artifact download bundle/ios/App.js .
5+
buildkite-agent artifact download bundle/ios/App.composed.js.map .
56
buildkite-agent artifact download ios-assets.tar.gz .
67
mkdir -p ios-xcframework/Gutenberg/Resources
78
tar -xzvf ios-assets.tar.gz -C ios-xcframework/Gutenberg/Resources/

.buildkite/pipeline.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,9 @@ steps:
142142
echo "--- :arrow_up: Upload Android bundle artifact"
143143
buildkite-agent artifact upload bundle/android/App.js
144144
145-
if [[ -n "$BUILDKITE_TAG" ]]; then
146-
echo "--- :arrow_up: Upload Android source map"
147-
node gutenberg/node_modules/react-native/scripts/compose-source-maps.js bundle/android/App.text.js.map bundle/android/App.js.map -o bundle/android/App.composed.js.map
148-
buildkite-agent artifact upload bundle/android/App.composed.js.map
149-
fi
145+
echo "--- :arrow_up: Upload Android source map"
146+
node gutenberg/node_modules/react-native/scripts/compose-source-maps.js bundle/android/App.text.js.map bundle/android/App.js.map -o bundle/android/App.composed.js.map
147+
buildkite-agent artifact upload bundle/android/App.composed.js.map
150148
151149
echo "--- :ios: Build iOS bundle"
152150
npm run bundle:ios
@@ -156,11 +154,9 @@ steps:
156154
tar -czvf ios-assets.tar.gz -C ios-xcframework/Gutenberg/Resources assets/
157155
buildkite-agent artifact upload ios-assets.tar.gz
158156
159-
if [[ -n "$BUILDKITE_TAG" ]]; then
160-
echo "--- :arrow_up: Upload iOS source map"
161-
node gutenberg/node_modules/react-native/scripts/compose-source-maps.js bundle/ios/App.text.js.map bundle/ios/App.js.map -o bundle/ios/App.composed.js.map
162-
buildkite-agent artifact upload bundle/ios/App.composed.js.map
163-
fi
157+
echo "--- :arrow_up: Upload iOS source map"
158+
node gutenberg/node_modules/react-native/scripts/compose-source-maps.js bundle/ios/App.text.js.map bundle/ios/App.js.map -o bundle/ios/App.composed.js.map
159+
buildkite-agent artifact upload bundle/ios/App.composed.js.map
164160
165161
- label: "Build Android RN Aztec & Publish to S3"
166162
depends_on:

0 commit comments

Comments
 (0)