Skip to content

Commit 30eb86f

Browse files
authored
Release 9.1.0 (#473)
1 parent fc4f583 commit 30eb86f

File tree

53 files changed

+217
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+217
-160
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v9.1.0 (2020-03-19)
2+
3+
* Bump Native SDKs to v9.1
4+
* Adds automatic sourcemap upload support for Hermes.
5+
16
## v9.0.7 (2020-03-10)
27

38
* Bump iOS Native SDK to v9.0.12

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ If your app doesn’t already access the microphone or photo library, we recomme
213213
214214
## Uploading Source Map Files for Crash Reports
215215
216-
For your app crashes to show up with a fully symbolicated stack trace, we will automatically generate the source map files and upload them to your dashboard on release build. To do so, we rely on your app token being explicitly added to `Instabug.start('YOUR_APP_TOKEN')` in JavaScript.
216+
For your app crashes to show up with a fully symbolicated stack trace, we will automatically generate the source map files and upload them to your dashboard on release build. To do so, we rely on your app token being explicitly added to `Instabug.start('YOUR_APP_TOKEN')` in JavaScript.
217217
218218
If your app token is defined as a constant, you can set an environment variable `INSTABUG_APP_TOKEN` to be used instead.
219+
We also automatically read your `versionName` and `versionCode` to upload your sourcemap file. alternatively, can also set the environment variables `INSTABUG_APP_VERSION_NAME` and `INSTABUG_APP_VERSION_CODE` to be used instead.
219220
220221
To disable the automatic upload in android, you can set the following property your build.gradle:
221222
```dart

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ android {
2929
dependencies {
3030
implementation 'com.android.support:multidex:1.0.3'
3131
implementation 'com.facebook.react:react-native:+'
32-
api('com.instabug.library:instabug:9.0.5.3') {
32+
api('com.instabug.library:instabug:9.1.0.0') {
3333
exclude group: 'com.android.support:appcompat-v7'
3434
}
3535
testImplementation 'org.mockito:mockito-core:1.10.19'

android/upload_sourcemap.sh

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,55 @@ if [ ! "${INSTABUG_APP_TOKEN}" ] || [ -z "${INSTABUG_APP_TOKEN}" ]; then
1818
echo "Instabug: err: INSTABUG_APP_TOKEN not found. Make sure you've added the SDK initialization line Instabug.start Or added the environment variable INSTABUG_APP_TOKEN"
1919
exit 0
2020
else
21+
if [ ! "${INSTABUG_APP_VERSION_CODE}" ] || [ -z "${INSTABUG_APP_VERSION_CODE}" ]; then
22+
INSTABUG_APP_VERSION_CODE=$(grep -o "versionCode\s\+\d\+" android/app/build.gradle | awk '{ print $2 }')
23+
if [ ! "${INSTABUG_APP_VERSION_CODE}" ] || [ -z "${INSTABUG_APP_VERSION_CODE}" ]; then
24+
echo "versionCode could not be found, please upload the sourcemap files manually"
25+
exit 0
26+
fi
27+
fi
28+
if [ ! "${INSTABUG_APP_VERSION_CODE}" ] || [ -z "${INSTABUG_APP_VERSION_CODE}" ]; then
29+
INSTABUG_APP_VERSION_NAME=$(grep "versionName" android/app/build.gradle | awk '{print $2}' | tr -d \''"\')
30+
if [ ! "${INSTABUG_APP_VERSION_NAME}" ] || [ -z "${INSTABUG_APP_VERSION_NAME}" ]; then
31+
echo "versionName could not be found, please upload the sourcemap files manually"
32+
exit 0
33+
fi
34+
fi
35+
VERSION='{"code":"'"$INSTABUG_APP_VERSION_CODE"'","name":"'"$INSTABUG_APP_VERSION_NAME"'"}'
2136
echo "Instabug: Token found" "\""${INSTABUG_APP_TOKEN}"\""
2237
echo "Instabug: Generating sourcemap files..."
23-
#Generate android sourcemap
24-
react-native bundle --platform android \
25-
--entry-file index.js \
26-
--dev false \
27-
--bundle-output ./android/main.jsbundle \
28-
--sourcemap-output ./android-sourcemap.json
38+
IS_HERMES=$(grep "enableHermes:" ./android/app/build.gradle)
39+
if [[ $IS_HERMES == *"true"* ]]; then
40+
#Generate android sourcemap (HERMES)
41+
react-native bundle --platform android \
42+
--reset-cache \
43+
--entry-file index.js \
44+
--dev false \
45+
--bundle-output index.android.bundle \
46+
--sourcemap-output index.android.bundle.packager.map \
47+
48+
node_modules/hermes-engine/osx-bin/hermes -emit-binary -out index.android.bundle.hbc index.android.bundle -O -output-source-map > /dev/null 2>&1
49+
50+
cp index.android.bundle.hbc.map index.android.bundle.compiler.map
51+
52+
node node_modules/react-native/scripts/compose-source-maps.js index.android.bundle.packager.map index.android.bundle.compiler.map -o android-sourcemap.json
53+
rm -rf index.android.bundle
54+
rm -rf index.android.bundle.hbc.map
55+
rm -rf index.android.bundle.compiler.map
56+
rm -rf index.android.bundle.hbc
57+
rm -rf index.android.bundle.packager.map
58+
rm -rf index.android.bundle.map
59+
else
60+
#Generate android sourcemap
61+
react-native bundle --platform android \
62+
--entry-file index.js \
63+
--dev false \
64+
--bundle-output ./android/main.jsbundle \
65+
--sourcemap-output ./android-sourcemap.json
66+
fi
2967
echo "Instabug: Uploading files..."
3068
#Upload android sourcemap
31-
curl -X POST 'https://api.instabug.com/api/sdk/v3/symbols_files' -F "symbols_file=@./android-sourcemap.json" -F "application_token=${INSTABUG_APP_TOKEN}" -F "platform=react_native" -F "os=android"
69+
curl -X POST 'https://api.instabug.com/api/sdk/v3/symbols_files' -F "app_version=${VERSION}" -F "symbols_file=@./android-sourcemap.json" -F "application_token=${INSTABUG_APP_TOKEN}" -F "platform=react_native" -F "os=android"
3270
rm -rf android-sourcemap.json
3371
echo
34-
fi
72+
fi

ios/Instabug.framework/Headers/IBGBugReporting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
77
8-
Version: 9.0.12
8+
Version: 9.1
99
*/
1010

1111
#import <Foundation/Foundation.h>

ios/Instabug.framework/Headers/IBGChats.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
77
8-
Version: 9.0.12
8+
Version: 9.1
99
*/
1010

1111
#import <Foundation/Foundation.h>

ios/Instabug.framework/Headers/IBGCrashReporting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
77
8-
Version: 9.0.12
8+
Version: 9.1
99
*/
1010

1111
#import <Foundation/Foundation.h>

ios/Instabug.framework/Headers/IBGFeatureRequests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
77
8-
Version: 9.0.12
8+
Version: 9.1
99
*/
1010

1111

0 commit comments

Comments
 (0)