diff --git a/CHANGELOG.md b/CHANGELOG.md index 379587c32..e7746add5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,26 +1,23 @@ -## [0.6.5](https://github.com/flocasts/flo-scss/compare/v0.6.5...v0.6.5) (2020-04-16) - +## [0.6.5](https://github.com/flocasts/flo-scss/compare/v0.6.4...v0.6.5) (2020-04-16) ### Bug Fixes * update circleci config ([19ce49c](https://github.com/flocasts/flo-scss/commit/19ce49cac8f403b36d503f36239631db45384d02)) -## [0.6.5](https://github.com/flocasts/flo-scss/compare/v0.6.5...v0.6.5) (2020-04-16) - +## [0.6.4](https://github.com/flocasts/flo-scss/compare/v0.6.3...v0.6.4) (2020-04-16) ### Bug Fixes * ensure add the assets ([f108c4b](https://github.com/flocasts/flo-scss/commit/f108c4b325a318814d79bd7bb528f6f9f962a6e5)) -## [0.6.5](https://github.com/flocasts/flo-scss/compare/v0.6.5...v0.6.5) (2020-04-16) - +## [0.6.3](https://github.com/flocasts/flo-scss/compare/v0.6.2...v0.6.3) (2020-04-16) ### Bug Fixes * more scripts ([1a14509](https://github.com/flocasts/flo-scss/commit/1a145092d2a2cdece8e1306b8b6181fc80345d20)) * rewrite more files ([0c5547d](https://github.com/flocasts/flo-scss/commit/0c5547d5d97de29690ee7b05b6cc9f3473770d21)) -## [0.6.5](https://github.com/flocasts/flo-scss/compare/v0.6.1...v0.6.5) (2020-04-13) +## [0.6.2](https://github.com/flocasts/flo-scss/compare/v0.6.1...v0.6.2) (2020-04-13) ### Features diff --git a/build/change-version.js b/build/change-version.js index fdcdf4a84..44ca112eb 100755 --- a/build/change-version.js +++ b/build/change-version.js @@ -52,19 +52,19 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) { }) } -function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { +function replaceRecursively(directory, excludedDirectories, excludedFiles, allowedExtensions, original, replacement) { original = new RegExp(regExpQuote(original), 'g') replacement = regExpQuoteReplacement(replacement) const updateFile = DRY_RUN ? (filepath) => { const parsedPath = path.parse(filepath) - if (allowedExtensions.has(parsedPath.ext) && parsedPath.base !== 'package-lock.json') { + if (allowedExtensions.has(parsedPath.ext) && !excludedFiles.has(parsedPath.base)) { console.log(`FILE: ${filepath}`) } else { console.log(`EXCLUDED:${filepath}`) } } : (filepath) => { const parsedPath = path.parse(filepath) - if (allowedExtensions.has(parsedPath.ext) && parsedPath.base !== 'package-lock.json') { + if (allowedExtensions.has(parsedPath.ext) && !excludedFiles.has(parsedPath.base)) { sh.sed('-i', original, replacement, filepath) } } @@ -89,6 +89,10 @@ function main(args) { 'node_modules', 'vendor' ]) + const EXCLUDED_FILES = new Set([ + 'CHANGELOG.md', + 'package-lock.json' + ]) const INCLUDED_EXTENSIONS = new Set([ // This extension whitelist is how we avoid modifying binary files '', @@ -102,7 +106,7 @@ function main(args) { '.txt', '.yml' ]) - replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion) + replaceRecursively('.', EXCLUDED_DIRS, EXCLUDED_FILES, INCLUDED_EXTENSIONS, oldVersion, newVersion) } main(process.argv.slice(2))