Skip to content

Commit

Permalink
Tweak the build to only append -NEXT when running a grunt next build.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdamien committed Sep 18, 2017
1 parent 0a7a7ac commit 7442006
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ module.exports = function (grunt) {

// Default values
version: 'NEXT',
fileVersion: "-<%= version %>",
name: 'easeljs',

// Setup doc names / paths.
docsName: '<%= pkg.name %>_docs-<%= version %>',
docsName: '<%= pkg.name %>_docs<%= fileVersion %>',
docsZip: "<%= docsName %>.zip",

// Setup watch to watch the source and rebuild when it changes. Also livereload
Expand Down Expand Up @@ -63,7 +64,7 @@ module.exports = function (grunt) {
},
build: {
files: {
'output/<%= pkg.name.toLowerCase() %>-<%= version %>.min.js': getConfigValue('easel_source')
'output/<%= pkg.name.toLowerCase() %><%= fileVersion %>.min.js': getConfigValue('easel_source')
}
}
},
Expand Down Expand Up @@ -102,7 +103,7 @@ module.exports = function (grunt) {
},
build: {
files: {
'output/<%= pkg.name.toLowerCase() %>-<%= version %>.js': combineSource(
'output/<%= pkg.name.toLowerCase() %><%= fileVersion %>.js': combineSource(
[
{cwd: '', config:'config.json', source:'easel_source'}
]
Expand Down Expand Up @@ -175,7 +176,7 @@ module.exports = function (grunt) {
},
src: {
files: [
{expand: true, cwd:'./output/', src: '*<%=version %>*.js', dest: '../lib/'}
{expand: true, cwd:'./output/', src: '*<%=fileVersion %>*.js', dest: '../lib/'}
]
}
},
Expand Down Expand Up @@ -308,6 +309,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('setVersion', function () {
grunt.config.set('version', grunt.config.get('pkg').version);
grunt.config.set("fileVersion", "");
});

/**
Expand Down

0 comments on commit 7442006

Please sign in to comment.