diff --git a/tools/release.mjs b/tools/release.mjs index 0904dfdf684eda55a1b5daaa369aacd067484dde..3ea6f6cb625d8f4b737feec6c4743ef8f8ff680c 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}`)