From b46a5fa233de090251689ac8c28eae1454b9cfd3 Mon Sep 17 00:00:00 2001 From: shadow <81448108+shdwmtr@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:36:42 -0400 Subject: [PATCH] fix: Simplify metadata --- .github/workflows/ci.yml | 2 +- scripts/release.js | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbee1f4..497c516 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,7 +76,7 @@ jobs: touch "$folder"metadata.json # write current commit id to metadata.json - echo "{\"commit\": \"$(git rev-parse HEAD)\"}" > "$folder"metadata.json + echo "{\"commit\": \"$(git -C "$folder" rev-parse HEAD)\"}" > "$folder"metadata.json echo "Zipping folder: $folder" zip -r "$out.zip" "$folder" || echo "Failed to zip $folder" diff --git a/scripts/release.js b/scripts/release.js index b2aaa13..92d1cf8 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -23,16 +23,13 @@ module.exports = { generateNotes: async () => { const pluginsDir = path.resolve(process.cwd(), 'plugins'); let pluginIds = []; - let releaseNotes = ''; + let releaseNotes = '```json'; if (fs.existsSync(pluginsDir)) { fs.readdirSync(pluginsDir).forEach(submodule => { pluginIds.push(ParsePlugin(pluginsDir, submodule)); }); } - for (let plugin of pluginIds) { - releaseNotes += `${btoa(plugin.plugin)}: ${plugin.commitId}\n`; - } - - return releaseNotes; + releaseNotes += JSON.stringify(pluginIds, null, 4); + return releaseNotes + '```'; } };