Skip to content

Commit

Permalink
fix: LIVE_UPDATE_APP_VERSION for Sentry release instead of FYLE_MOBIL…
Browse files Browse the repository at this point in the history
…E_RELEASE_VERSION (#3264)
  • Loading branch information
Aniruddha-Shriwant authored Nov 18, 2024
1 parent fbf0c91 commit 9782dc9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions hooks/prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9782dc9

Please sign in to comment.