From 9ec30f410729b2cb4033326836f629b35bd0ce21 Mon Sep 17 00:00:00 2001 From: Adhityan K V Date: Tue, 26 Nov 2024 18:03:55 +0100 Subject: [PATCH] chore: revert build script --- scripts/publish-via-nx.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/publish-via-nx.js b/scripts/publish-via-nx.js index 13c7e679..3dba021d 100644 --- a/scripts/publish-via-nx.js +++ b/scripts/publish-via-nx.js @@ -59,7 +59,7 @@ async function updatePackageVersion(pkgName, version, versionMap, dryRun) { if (!found) console.error(`Could not find '${pkgName}' in any of the folders`); } -async function createRelease(dryRun, version, isCi) { +async function createRelease(dryRun, version, makeGitCommit) { console.log('Running nx release'); const { workspaceVersion, projectsVersionData } = await releaseVersion({ gitTag: false, @@ -89,10 +89,10 @@ async function createRelease(dryRun, version, isCi) { versionData: projectsVersionData, version: workspaceVersion, verbose: true, - dryRun: !isCi, + dryRun, }); - if (isCi) { + if (makeGitCommit) { console.log('Committing changes'); const git = simpleGit().clean(CleanOptions.FORCE); @@ -115,6 +115,7 @@ async function startReleasePipeline() { const isCi = args['--ci'] ? true : false; const dryRun = isCi ? false : await confirm({ message: 'Is this a dry run?', default: true, required: true }); + const makeGitCommit = isCi ? false : !dryRun; let version = 'patch'; if (!args['--version']) { @@ -133,7 +134,7 @@ async function startReleasePipeline() { } } else version = args['--version']; - await createRelease(dryRun, version, isCi); + await createRelease(dryRun, version, makeGitCommit); } await startReleasePipeline();