File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -258,9 +258,16 @@ module.exports = function(grunt) {
258258 // Custom Grunt tasks
259259 grunt . registerTask ( 'version' , function ( ) {
260260 var pkg = grunt . config . get ( 'pkg' ) ;
261+
262+ // Verify version string in source code matches what's in package.json
263+ var Raven = require ( './src/raven' ) ;
264+ if ( Raven . prototype . VERSION !== pkg . version ) {
265+ return grunt . util . error ( 'Mismatched version in src/raven.js: ' + Raven . prototype . VERSION +
266+ ' (should be ' + pkg . version + ')' ) ;
267+ }
268+
261269 if ( grunt . option ( 'dev' ) ) {
262270 pkg . release = 'dev' ;
263- pkg . version = grunt . config . get ( 'gitinfo' ) . local . branch . current . shortSHA ;
264271 } else {
265272 pkg . release = pkg . version ;
266273 }
Original file line number Diff line number Diff line change 1111 "type" : " git" ,
1212 "url" : " git://github.com/getsentry/raven-js.git"
1313 },
14- "main" : " dist/raven .js" ,
14+ "main" : " src/singleton .js" ,
1515 "devDependencies" : {
1616 "browserify-versionify" : " ^1.0.6" ,
1717 "chai" : " 2.3.0" ,
Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ function Raven() {
7171 */
7272
7373Raven . 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' ,
7579
7680 debug : false ,
7781
You can’t perform that action at this time.
0 commit comments