File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ module.exports = {
3030 revisionKey : function ( context ) {
3131 return context . revisionData && context . revisionData . revisionKey ;
3232 } ,
33+ disableRevisionTagging : false ,
3334
3435 didDeployMessage : function ( context ) {
3536 return "Uploaded sourcemaps to sentry release: "
@@ -53,7 +54,18 @@ module.exports = {
5354 } ,
5455
5556 willUpload : function ( context ) {
56- var revisionKey = context . revisionKey ;
57+ var isDisabled = this . readConfig ( 'disableRevisionTagging' ) ;
58+ if ( isDisabled ) {
59+ return ;
60+ }
61+
62+ var revisionKey = this . readConfig ( 'revisionKey' ) ;
63+ if ( ! revisionKey ) {
64+ return new SilentError ( "Could not find revision key to fingerprint Sentry revision with." ) ;
65+ }
66+
67+ // TODO instead of plainly reading index.html, minimatch
68+ // getConfig('revision patterns') on context.distFiles
5769 var indexPath = path . join ( context . distDir , "index.html" ) ;
5870 var index = fs . readFileSync ( indexPath , 'utf8' ) ;
5971 var index = index . replace ( '<meta name="sentry:revision">' ,
You can’t perform that action at this time.
0 commit comments