mihomo-party/scripts/updater.mjs
2024-08-18 15:20:45 +08:00

13 lines
311 B
JavaScript

import yaml from 'yaml'
import { readFileSync, writeFileSync } from 'fs'
const pkg = readFileSync('package.json', 'utf-8')
const changelog = readFileSync('changelog.md', 'utf-8')
const { version } = JSON.parse(pkg)
const latest = {
version,
changelog
}
writeFileSync('latest.yml', yaml.stringify(latest))