1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-09 05:15:02 +00:00
mon-entreprise/scripts/check-changelog.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
381 B
JavaScript
Raw Normal View History

// Ensure that current package version is referenced in the Changelog.md
import { readFileSync } from 'fs'
const packageVersion = JSON.parse(readFileSync('./package.json')).version
const changelog = readFileSync('./CHANGELOG.md')
if (!changelog.includes(`## ${packageVersion}\n`)) {
throw Error(
`Current version ${packageVersion} is not referenced in the CHANGELOG.md`
)
}