File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 39
39
echo " Instabug: Generating sourcemap files..."
40
40
IS_HERMES=$( grep " enableHermes:" ./android/app/build.gradle -m 1)
41
41
if [[ $IS_HERMES == * " true" * ]]; then
42
+ # Find HERMES OS bin directory
43
+ case " $OSTYPE " in
44
+ darwin* ) HERMES_OS_BIN=' osx-bin' ;;
45
+ linux* ) HERMES_OS_BIN=' linux64-bin' ;;
46
+ msys* ) HERMES_OS_BIN=' win64-bin' ;;
47
+ * ) echo " unknown: $OSTYPE " ;;
48
+ esac
49
+
50
+ # Find HERMES command file name
51
+ INSTALLED_RN_VERSION_MAJOR=$( node -p " require('./node_modules/react-native/package.json').version" | cut -d " ." -f2)
52
+ if [ " $INSTALLED_RN_VERSION_MAJOR " -ge 63 ]
53
+ then
54
+ HERMES_COMMAND_NAME=' hermesc'
55
+ else
56
+ HERMES_COMMAND_NAME=' hermes'
57
+
58
+ fi
42
59
# Generate android sourcemap (HERMES)
43
60
react-native bundle --platform android \
44
61
--reset-cache \
47
64
--bundle-output index.android.bundle \
48
65
--sourcemap-output index.android.bundle.packager.map \
49
66
50
- 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
67
+ node_modules/hermes-engine/$HERMES_OS_BIN / $HERMES_COMMAND_NAME -emit-binary -out index.android.bundle.hbc index.android.bundle -O -output-source-map > /dev/null 2>&1
51
68
52
69
cp index.android.bundle.hbc.map index.android.bundle.compiler.map
53
70
You can’t perform that action at this time.
0 commit comments