File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -258,13 +258,11 @@ module.exports = function(grunt) {
258
258
// Custom Grunt tasks
259
259
grunt . registerTask ( 'version' , function ( ) {
260
260
var pkg = grunt . config . get ( 'pkg' ) ;
261
- if ( grunt . option ( 'dev' ) ) {
262
- pkg . release = 'dev' ;
263
- pkg . version = grunt . config . get ( 'gitinfo' ) . local . branch . current . shortSHA ;
264
- } else {
265
- pkg . release = pkg . version ;
261
+ var Raven = require ( './src/raven' ) ;
262
+ if ( Raven . prototype . VERSION !== pkg . version ) {
263
+ return grunt . util . error ( 'Mismatched version in src/raven.js: ' + Raven . prototype . VERSION +
264
+ ' (should be ' + pkg . version + ')' ) ;
266
265
}
267
- grunt . config . set ( 'pkg' , pkg ) ;
268
266
} ) ;
269
267
270
268
grunt . registerMultiTask ( 'fixSourceMaps' , function ( ) {
Original file line number Diff line number Diff line change 11
11
"type" : " git" ,
12
12
"url" : " git://github.com/getsentry/raven-js.git"
13
13
},
14
- "main" : " dist/raven .js" ,
14
+ "main" : " src/singleton .js" ,
15
15
"devDependencies" : {
16
16
"browserify-versionify" : " ^1.0.6" ,
17
17
"chai" : " 2.3.0" ,
Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ function Raven() {
71
71
*/
72
72
73
73
Raven . prototype = {
74
- VERSION : '__VERSION__' ,
74
+ // Hardcode version string so that raven source can be loaded directly via
75
+ // webpack (using a build step causes webpack #1617). Grunt verifies that
76
+ // this value matches package.json during build.
77
+ // See: https://github.com/getsentry/raven-js/issues/465
78
+ VERSION : '2.0.0' ,
75
79
76
80
debug : false ,
77
81
You can’t perform that action at this time.
0 commit comments