From 76b2bc4df4e02495ddb021b6e2e369f051ffef83 Mon Sep 17 00:00:00 2001 From: Aniruddha Shriwant Date: Mon, 18 Nov 2024 10:24:13 +0530 Subject: [PATCH] fix: LIVE_UPDATE_APP_VERSION for Sentry release instead of FYLE_MOBILE_RELEASE_VERSION --- hooks/prebuild.js | 9 --------- src/main.ts | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) 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);