Skip to content

Commit

Permalink
Release 9.1.0 (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
alyezz authored Mar 19, 2020
1 parent fc4f583 commit 30eb86f
Show file tree
Hide file tree
Showing 53 changed files with 217 additions and 160 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v9.1.0 (2020-03-19)

* Bump Native SDKs to v9.1
* Adds automatic sourcemap upload support for Hermes.

## v9.0.7 (2020-03-10)

* Bump iOS Native SDK to v9.0.12
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ If your app doesn’t already access the microphone or photo library, we recomme
## Uploading Source Map Files for Crash Reports
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.
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.
If your app token is defined as a constant, you can set an environment variable `INSTABUG_APP_TOKEN` to be used instead.
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.
To disable the automatic upload in android, you can set the following property your build.gradle:
```dart
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.facebook.react:react-native:+'
api('com.instabug.library:instabug:9.0.5.3') {
api('com.instabug.library:instabug:9.1.0.0') {
exclude group: 'com.android.support:appcompat-v7'
}
testImplementation 'org.mockito:mockito-core:1.10.19'
Expand Down
54 changes: 46 additions & 8 deletions android/upload_sourcemap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,55 @@ if [ ! "${INSTABUG_APP_TOKEN}" ] || [ -z "${INSTABUG_APP_TOKEN}" ]; then
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"
exit 0
else
if [ ! "${INSTABUG_APP_VERSION_CODE}" ] || [ -z "${INSTABUG_APP_VERSION_CODE}" ]; then
INSTABUG_APP_VERSION_CODE=$(grep -o "versionCode\s\+\d\+" android/app/build.gradle | awk '{ print $2 }')
if [ ! "${INSTABUG_APP_VERSION_CODE}" ] || [ -z "${INSTABUG_APP_VERSION_CODE}" ]; then
echo "versionCode could not be found, please upload the sourcemap files manually"
exit 0
fi
fi
if [ ! "${INSTABUG_APP_VERSION_CODE}" ] || [ -z "${INSTABUG_APP_VERSION_CODE}" ]; then
INSTABUG_APP_VERSION_NAME=$(grep "versionName" android/app/build.gradle | awk '{print $2}' | tr -d \''"\')
if [ ! "${INSTABUG_APP_VERSION_NAME}" ] || [ -z "${INSTABUG_APP_VERSION_NAME}" ]; then
echo "versionName could not be found, please upload the sourcemap files manually"
exit 0
fi
fi
VERSION='{"code":"'"$INSTABUG_APP_VERSION_CODE"'","name":"'"$INSTABUG_APP_VERSION_NAME"'"}'
echo "Instabug: Token found" "\""${INSTABUG_APP_TOKEN}"\""
echo "Instabug: Generating sourcemap files..."
#Generate android sourcemap
react-native bundle --platform android \
--entry-file index.js \
--dev false \
--bundle-output ./android/main.jsbundle \
--sourcemap-output ./android-sourcemap.json
IS_HERMES=$(grep "enableHermes:" ./android/app/build.gradle)
if [[ $IS_HERMES == *"true"* ]]; then
#Generate android sourcemap (HERMES)
react-native bundle --platform android \
--reset-cache \
--entry-file index.js \
--dev false \
--bundle-output index.android.bundle \
--sourcemap-output index.android.bundle.packager.map \

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

cp index.android.bundle.hbc.map index.android.bundle.compiler.map

node node_modules/react-native/scripts/compose-source-maps.js index.android.bundle.packager.map index.android.bundle.compiler.map -o android-sourcemap.json
rm -rf index.android.bundle
rm -rf index.android.bundle.hbc.map
rm -rf index.android.bundle.compiler.map
rm -rf index.android.bundle.hbc
rm -rf index.android.bundle.packager.map
rm -rf index.android.bundle.map
else
#Generate android sourcemap
react-native bundle --platform android \
--entry-file index.js \
--dev false \
--bundle-output ./android/main.jsbundle \
--sourcemap-output ./android-sourcemap.json
fi
echo "Instabug: Uploading files..."
#Upload android sourcemap
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"
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"
rm -rf android-sourcemap.json
echo
fi
fi
2 changes: 1 addition & 1 deletion ios/Instabug.framework/Headers/IBGBugReporting.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
Version: 9.0.12
Version: 9.1
*/

#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletion ios/Instabug.framework/Headers/IBGChats.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
Version: 9.0.12
Version: 9.1
*/

#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletion ios/Instabug.framework/Headers/IBGCrashReporting.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
Version: 9.0.12
Version: 9.1
*/

#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletion ios/Instabug.framework/Headers/IBGFeatureRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
Version: 9.0.12
Version: 9.1
*/


Expand Down
Loading

0 comments on commit 30eb86f

Please sign in to comment.