From 33e75556acb3cad0280a9fb4797b2b9b479ec875 Mon Sep 17 00:00:00 2001 From: Mayank Date: Sun, 30 Jun 2024 09:29:04 +0530 Subject: [PATCH] Publish canonicals --- scripts/publish-canonical.js | 7 +++++++ scripts/publish.js | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 scripts/publish-canonical.js diff --git a/scripts/publish-canonical.js b/scripts/publish-canonical.js new file mode 100644 index 00000000..83dbcb83 --- /dev/null +++ b/scripts/publish-canonical.js @@ -0,0 +1,7 @@ +const { execSync } = require("child_process"); + +// Publish canonical packages +["esbuild-glsl", "esbuild-webgl"].forEach(pkg => { + execSync(`sed -i -e "s/name.*/name\\": \\"${pkg}\\",/" lib/package.json`); + execSync("cd lib && npm publish --provenance --access public"); +}); diff --git a/scripts/publish.js b/scripts/publish.js index 24593e78..7a83fc74 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -46,3 +46,6 @@ execSync("cd lib && pnpm build && npm publish --provenance --access public"); execSync( `gh release create ${VERSION} --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${VERSION}"`, ); + +// Publish canonical packages +execSync("node scripts/publish-canonical.js");