mirror of
https://github.com/nossimonov/obsidian-chartdown.git
synced 2026-07-22 08:38:09 +00:00
BOM-tolerant manifest parse in the release workflow
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
d44993394b
commit
36f9274e89
1 changed files with 2 additions and 1 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
|
@ -50,7 +50,8 @@ jobs:
|
|||
cp chartdown/packages/obsidian/dist/manifest.json manifest.json
|
||||
node -e "
|
||||
const fs = require('fs');
|
||||
const m = JSON.parse(fs.readFileSync('manifest.json', 'utf8'));
|
||||
// BOM-tolerant: Windows tooling occasionally writes one.
|
||||
const m = JSON.parse(fs.readFileSync('manifest.json', 'utf8').replace(/^/, ''));
|
||||
const versions = fs.existsSync('versions.json') ? JSON.parse(fs.readFileSync('versions.json', 'utf8')) : {};
|
||||
versions[m.version] = m.minAppVersion;
|
||||
fs.writeFileSync('versions.json', JSON.stringify(versions, null, 2) + '\n');
|
||||
|
|
|
|||
Loading…
Reference in a new issue