File tree Expand file tree Collapse file tree 6 files changed +40
-11
lines changed
Expand file tree Collapse file tree 6 files changed +40
-11
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,12 @@ commands:
137137 - run :
138138 name : Build Application
139139 command : yarn build:prod
140+ - run :
141+ name : Mark Sentry release
142+ command : |
143+ if [ "${CIRCLE_BRANCH}" == "master" ]; then
144+ node packages/app/scripts/sentry-create-release.js
145+ fi
140146 - save_cache : *save_prod_cache
141147 - run :
142148 name : Remove non-images from public
Original file line number Diff line number Diff line change @@ -9,20 +9,11 @@ const normalizeName = require('webpack/lib/optimize/SplitChunksPlugin')
99 . normalizeName ;
1010const ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
1111const CopyWebpackPlugin = require ( 'copy-webpack-plugin' ) ;
12- const childProcess = require ( 'child_process' ) ;
12+ const VERSION = require ( '@codesandbox/common/lib/version' ) . default ;
1313const commonConfig = require ( './webpack.common' ) ;
1414
1515const publicPath = '/' ;
1616
17- const COMMIT_COUNT = childProcess
18- . execSync ( 'git rev-list --count HEAD' )
19- . toString ( ) ;
20-
21- const COMMIT_HASH = childProcess
22- . execSync ( 'git rev-parse --short HEAD' )
23- . toString ( ) ;
24- const VERSION = `${ COMMIT_COUNT } -${ COMMIT_HASH } ` ;
25-
2617const normalize = normalizeName ( { name : true , automaticNameDelimiter : '~' } ) ;
2718
2819module . exports = merge ( commonConfig , {
Original file line number Diff line number Diff line change 4141 "@babel/preset-flow" : " ^7.0.0" ,
4242 "@babel/preset-react" : " ^7.0.0" ,
4343 "@babel/preset-typescript" : " ^7.3.3" ,
44+ "@sentry/cli" : " ^1.47.1" ,
4445 "@types/codemirror" : " ^0.0.72" ,
4546 "@types/debug" : " ^4.1.1" ,
4647 "@types/gsap" : " ^1.20.1" ,
Original file line number Diff line number Diff line change 1+ const childProcess = require ( 'child_process' ) ;
2+ const VERSION = require ( '@codesandbox/common/lib/version' ) . default ;
3+
4+ const COMMIT_HASH = childProcess
5+ . execSync ( 'git rev-parse HEAD' )
6+ . toString ( )
7+ . trim ( ) ;
8+
9+ console . log ( 'Marking this release in Sentry' ) ;
10+ try {
11+ childProcess . execSync (
12+ `yarn sentry-cli releases --org=codesandbox -p frontend new "${ VERSION } "`
13+ ) ;
14+ childProcess . execSync (
15+ `yarn sentry-cli releases --org=codesandbox set-commits "${ VERSION } " --commit "CompuIves/codesandbox-client@${ COMMIT_HASH } "`
16+ ) ;
17+ console . log ( 'Marked release' ) ;
18+ } catch ( e ) {
19+ console . error ( e ) ;
20+ }
Original file line number Diff line number Diff line change 1+ const childProcess = require ( 'child_process' ) ;
2+ const VERSION = require ( '@codesandbox/common/lib/version' ) . default ;
3+
4+ console . log ( 'Marking this release as deployed in Sentry' ) ;
5+ try {
6+ childProcess . execSync (
7+ `yarn run sentry-cli releases --org=codesandbox deploys ${ VERSION } new -e PROD`
8+ ) ;
9+ } catch ( e ) {
10+ console . error ( e ) ;
11+ }
Original file line number Diff line number Diff line change 32863286 "@sentry/utils" "5.6.1"
32873287 tslib "^1.9.3"
32883288
3289- "@sentry/cli@^1.44.4":
3289+ "@sentry/cli@^1.44.4", "@sentry/cli@^1.47.1" :
32903290 version "1.47.1"
32913291 resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.47.1.tgz#6a3238e5bfa4f618867bc0bc145b8e2ba191ff46"
32923292 integrity sha512-WijaRu1lb99OL6rHee6uOSb1wDyNCbrWcTJoRCuZD83K2fw3U58p68nli/y8CoMwQ55Mrg6CgtY8pmBiuseG0A==
You can’t perform that action at this time.
0 commit comments