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 3939 echo " Instabug: Generating sourcemap files..."
4040 IS_HERMES=$( grep " enableHermes:" ./android/app/build.gradle -m 1)
4141 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
4259 # Generate android sourcemap (HERMES)
4360 react-native bundle --platform android \
4461 --reset-cache \
4764 --bundle-output index.android.bundle \
4865 --sourcemap-output index.android.bundle.packager.map \
4966
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
5168
5269 cp index.android.bundle.hbc.map index.android.bundle.compiler.map
5370
You can’t perform that action at this time.
0 commit comments