diff --git a/tasks/config/project/release.js b/tasks/config/project/release.js index 8981ffd229..5f6fe52cb0 100644 --- a/tasks/config/project/release.js +++ b/tasks/config/project/release.js @@ -7,7 +7,10 @@ const requireDotFile = require('require-dot-file'); let config, npmPackage, - version + version, + revision, + versionInFileName, + includeVersionInFileName ; /******************************* @@ -31,6 +34,20 @@ version = npmPackage && npmPackage.version !== undefined && npmPackage.name === ? npmPackage.version : config.version; +// looks for revision in config. +revision = config.revision === undefined ? '' : config.revision; + +includeVersionInFileName = config.includeVersionInFileName === undefined ? false : config.includeVersionInFileName; + +versionInFileName = ''; + +if (includeVersionInFileName) { + versionInFileName = '-' + version; + if (revision !== '') { + versionInFileName += '-' + revision; + } +} + /******************************* Export *******************************/ @@ -54,5 +71,6 @@ module.exports = { + ' */\n', version: version, + versionInFileName: versionInFileName, }; diff --git a/tasks/config/tasks.js b/tasks/config/tasks.js index 561b7d197e..050db04101 100644 --- a/tasks/config/tasks.js +++ b/tasks/config/tasks.js @@ -40,12 +40,12 @@ module.exports = { }, filenames: { - concatenatedCSS: 'semantic.css', - concatenatedJS: 'semantic.js', - concatenatedMinifiedCSS: 'semantic.min.css', - concatenatedMinifiedJS: 'semantic.min.js', - concatenatedRTLCSS: 'semantic.rtl.css', - concatenatedMinifiedRTLCSS: 'semantic.rtl.min.css', + concatenatedCSS: 'semantic' + release.versionInFileName + '.css', + concatenatedJS: 'semantic' + release.versionInFileName + '.js', + concatenatedMinifiedCSS: 'semantic' + release.versionInFileName + '.min.css', + concatenatedMinifiedJS: 'semantic' + release.versionInFileName + '.min.js', + concatenatedRTLCSS: 'semantic' + release.versionInFileName + '.rtl.css', + concatenatedMinifiedRTLCSS: 'semantic' + release.versionInFileName + '.rtl.min.css', }, regExp: {