From 288fb10d8adb4df3bbe4b5fd7cec10f2a9c86068 Mon Sep 17 00:00:00 2001 From: Korobeinikov Evgeny Date: Mon, 17 Feb 2025 19:11:59 +0300 Subject: [PATCH] compile when release --- tools/release.mjs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/release.mjs b/tools/release.mjs index 0904dfdf6..3ea6f6cb6 100644 --- a/tools/release.mjs +++ b/tools/release.mjs @@ -32,9 +32,18 @@ class Package { return json[key] } + compile() { + process.chdir(this.path) + try { + execSync(`npm run compile`) + } catch(e) { + console.log(`cannot compile package: ${this.name()}`, e) + } + } + publish() { process.chdir(this.path) - publishToOpenlab("next") + publish("next") } externalDependencies = [ @@ -104,7 +113,7 @@ function readVersion() { return new Version(version) } -function publishToOpenlab(tag, dryRun = false) { +function publish(tag, dryRun = false) { if (dryRun) { execSync(`npm publish --dry-run --tag ${tag}`) } else { @@ -113,6 +122,9 @@ function publishToOpenlab(tag, dryRun = false) { } function main() { + + all_packages.forEach(module => module.compile()) + const version = CURRENT_VERSION.toString() console.log(`> Updating idlize version to ${version}`) -- Gitee