Skip to content

Commit

Permalink
FIx sentry dist
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Nov 25, 2021
1 parent 403aae6 commit e5566ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

const CracoAntDesignPlugin = require('craco-antd');
const SentryCliPlugin = require('@sentry/webpack-plugin');
const os = require('os');
const packageJson = require('./package.json');

module.exports = () => {
Expand Down Expand Up @@ -87,7 +88,7 @@ module.exports = () => {
authToken: process.env.SENTRY_AUTH,
url: process.env.SOURCE_MAPS_UPLOAD,
release: packageJson.version,
dist: process.env.REACT_APP_RELEASE_TYPE
dist: `${process.env.REACT_APP_RELEASE_TYPE}-${os.platform()}`
})
);
} else {
Expand Down
3 changes: 2 additions & 1 deletion scripts/electronWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ const baseConfig = {
new webpack.EnvironmentPlugin({
NODE_ENV: process.env.NODE_ENV,
REACT_APP_RELEASE_TYPE: process.env.REACT_APP_RELEASE_TYPE,
GA_ID: process.env.GA_ID
GA_ID: process.env.GA_ID,
SENTRY_DSN: process.env.SENTRY_DSN
}),
new webpack.NamedModulesPlugin()
]
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom';
import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
import { basename } from 'path';
import os from 'os';
import { RewriteFrames as RewriteFramesIntegration } from '@sentry/integrations';
import { Provider } from 'react-redux';
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
Expand Down Expand Up @@ -118,7 +119,7 @@ ipcRenderer
],
tracesSampleRate: 1.0,
release: version,
dist: process.env.REACT_APP_RELEASE_TYPE
dist: `${process.env.REACT_APP_RELEASE_TYPE}-${os.platform()}`
});
})
.catch(console.error);
Expand Down

0 comments on commit e5566ee

Please sign in to comment.