mihomo-party/scripts/updater.mjs

13 lines
311 B
JavaScript
Raw Normal View History

2024-08-18 15:20:45 +08:00
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))