Skip to content

Commit

Permalink
[#1] Include the version in the released file
Browse files Browse the repository at this point in the history
  • Loading branch information
dreaming-augustin committed Dec 22, 2024
1 parent 84fc179 commit ac4d673
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
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 @@ const requireDotFile = require('require-dot-file');
let
config,
npmPackage,
version
version,
revision,
versionInFileName
;

/*******************************
Expand All @@ -31,6 +33,21 @@ 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;

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 @@ module.exports = {
+ ' */\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

0 comments on commit ac4d673

Please sign in to comment.