Skip to content

Commit

Permalink
Fix Raven.VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Dec 17, 2015
1 parent 32a5f26 commit 1c802ea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var proxyquire = require('proxyquireify');
var versionify = require('browserify-versionify');

module.exports = function(grunt) {
"use strict";
Expand Down Expand Up @@ -92,7 +93,9 @@ module.exports = function(grunt) {
browserifyOptions: {
banner: grunt.file.read('template/_copyright.js'),
standalone: 'Raven' // umd
}

},
transform: [versionify]
},
core: {
src: 'src/singleton.js',
Expand All @@ -102,6 +105,7 @@ module.exports = function(grunt) {
files: pluginConcatFiles,
options: {
transform: [
[ versionify ],
[ new AddPluginBrowserifyTransformer() ]
]
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"main": "src/singleton.js",
"devDependencies": {
"browserify-versionify": "^1.0.6",
"chai": "2.3.0",
"grunt": "^0.4.5",
"grunt-browserify": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/raven.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function Raven() {
*/

Raven.prototype = {
VERSION: '<%= pkg.version %>',
VERSION: '__VERSION__',

debug: true,

Expand Down
2 changes: 1 addition & 1 deletion test/raven.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ describe('globals', function() {
extra: {'session:duration': 100},
});
assert.deepEqual(opts.auth, {
sentry_client: 'raven-js/<%= pkg.version %>',
sentry_client: 'raven-js/2.0.0-rc2',
sentry_key: 'abc',
sentry_version: '7'
});
Expand Down

0 comments on commit 1c802ea

Please sign in to comment.