Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): optionally include version in released filename #3138

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion tasks/config/project/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
let
config,
npmPackage,
version
version,
revision,
versionInFileName
;

/*******************************
Expand All @@ -31,6 +33,21 @@
? npmPackage.version
: config.version;

// looks for revision in config.
revision = config.revision === undefined ? '' : config.revision;

includeVersionInFileName = config.includeVersionInFileName === undefined ? false : config.includeVersionInFileName;

Check failure on line 39 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

'includeVersionInFileName' is not defined

versionInFileName = '';

if (includeVersionInFileName) {

Check failure on line 43 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

'includeVersionInFileName' is not defined
versionInFileName = '-' + version;

Check failure on line 44 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected tab character

Check failure on line 44 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 4 spaces but found 1 tab
if (revision != '') {

Check failure on line 45 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected tab character

Check failure on line 45 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 4 spaces but found 1 tab

Check failure on line 45 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Expected '!==' and instead saw '!='
versionInFileName += '-' + revision;

Check failure on line 46 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected tab character

Check failure on line 46 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 8 spaces but found 2 tabs
}

Check failure on line 47 in tasks/config/project/release.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected tab character
}


/*******************************
Export
*******************************/
Expand All @@ -54,5 +71,6 @@
+ ' */\n',

version: version,
versionInFileName: versionInFileName,

};
12 changes: 6 additions & 6 deletions tasks/config/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.rtl' + release.versionInFileName + '.css',
concatenatedMinifiedRTLCSS: 'semantic.rtl' + release.versionInFileName + '.min.css',
},

regExp: {
Expand Down
Loading