Skip to content

Commit

Permalink
fix: changelog by omitting it from change-version script
Browse files Browse the repository at this point in the history
  • Loading branch information
kalebdf committed Apr 16, 2020
1 parent 9a76df6 commit 0bb5a83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 4 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 8 additions & 4 deletions build/change-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand All @@ -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
'',
Expand All @@ -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))

0 comments on commit 0bb5a83

Please sign in to comment.