diff --git a/hooks/prebuild.js b/hooks/prebuild.js index 3e143a0f2f..25e6c69e46 100644 --- a/hooks/prebuild.js +++ b/hooks/prebuild.js @@ -46,15 +46,6 @@ module.exports = function (ctx) { '/node_modules/@capacitor-community/camera-preview/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java', }; - // Adding mobile app version for tracking the release in sentry - var mainPath = path.resolve(process.cwd(), 'src/main.ts'); - var mainPathContent = fs.readFileSync(mainPath).toString(); - fs.writeFileSync( - mainPath, - mainPathContent.replace(/please-replace-your-mobile-app-version/g, ctx.env.FYLE_MOBILE_RELEASE_VERSION), - 'utf8' - ); - // Commenting Manifest.permission.RECORD_AUDIO on CameraPreview.java var cameraPreviewPath = path.resolve(process.cwd(), FILE_PATHS['android.cameraPreview']); var cameraPreviewContents = fs.readFileSync(cameraPreviewPath).toString(); diff --git a/src/main.ts b/src/main.ts index 0ab1cc9aac..d93c099866 100644 --- a/src/main.ts +++ b/src/main.ts @@ -38,7 +38,7 @@ Sentry.init({ dsn: environment.SENTRY_DSN, integrations: [], tracesSampleRate: 0.1, - release: 'please-replace-your-mobile-app-version', + release: environment.LIVE_UPDATE_APP_VERSION, ignoreErrors: ['Non-Error exception captured', 'Non-Error promise rejection captured'], beforeSend(event) { cleanHttpExceptionUrlsForSentryGrouping(event);