Files
blitzkit/scripts/checkVersionMissMatch.ts
T

12 lines
378 B
TypeScript
Raw Normal View History

2023-11-25 21:03:29 -06:00
import { readdir } from 'fs/promises';
import packageJSON from '../package.json';
const { version } = packageJSON;
const changelogs = await readdir('docs/changelogs');
const hasVersion = changelogs.includes(`${version}.md`);
if (hasVersion) {
console.log(`Version ${version} found in changelogs`);
} else {
throw new Error(`Version ${version} not found in changelogs`);
}