From 47cf1e3acd51a50ac0b342f9b8d63e3ec67c9b67 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 30 Sep 2024 21:19:59 -0700 Subject: [PATCH] build: use ts-node to spawn the version-bumper (#44057) Missed this in the tsification, we should probably call this via API instead of spawning a sub-proc? --- script/release/prepare-release.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/release/prepare-release.ts b/script/release/prepare-release.ts index 7dbcaf2bcf6..2913a3438e3 100755 --- a/script/release/prepare-release.ts +++ b/script/release/prepare-release.ts @@ -64,8 +64,13 @@ async function getNewVersion (dryRunMode: DryRunMode) { if (dryRunMode === DryRunMode.REAL_RUN) { console.log(`Bumping for new "${bumpType}" version.`); } - const bumpScript = join(__dirname, 'version-bumper.js'); - const scriptArgs = ['node', bumpScript, `--bump=${bumpType}`]; + const bumpScript = join(__dirname, 'version-bumper.ts'); + const scriptArgs = [ + 'node', + 'node_modules/.bin/ts-node', + bumpScript, + `--bump=${bumpType}` + ]; if (dryRunMode === DryRunMode.DRY_RUN) scriptArgs.push('--dryRun'); try { let bumpVersion = execSync(scriptArgs.join(' '), { encoding: 'utf-8' });