From f854486150b1b3ff29e7f34d6d6a66736e37a473 Mon Sep 17 00:00:00 2001 From: danstarns Date: Tue, 22 Oct 2024 14:19:35 +0100 Subject: [PATCH] refactor: remove versionCmd and commit match --- scripts/releaseDocs.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/releaseDocs.ts b/scripts/releaseDocs.ts index 8d72f126b0..31c5441b0f 100644 --- a/scripts/releaseDocs.ts +++ b/scripts/releaseDocs.ts @@ -15,16 +15,15 @@ async function prepareCoreRelease() { 'You have uncommitted changes. Please commit or stash them before running the release script.', ); - // Increment the Core version - const versionCmd = releaseTag === 'latest' ? 'patch' : `prerelease --preid ${releaseTag}`; - runCommand(`pnpm --filter @grapesjs/docs exec npm version ${versionCmd} --no-git-tag-version --no-commit-hooks`); + // Increment the docs version + runCommand(`pnpm --filter @grapesjs/docs exec npm version patch --no-git-tag-version --no-commit-hooks`); // Create a new release branch const newVersion = JSON.parse(fs.readFileSync(`${pathLib}/package.json`, 'utf8')).version; const newBranch = `release-docs-v${newVersion}`; runCommand(`git checkout -b ${newBranch}`); runCommand('git add .'); - runCommand(`git commit -m "Release GrapesJS docs ${releaseTag}: v${newVersion}"`); + runCommand(`git commit -m "Release GrapesJS docs: v${newVersion}"`); console.log(`Release prepared! Push the current "${newBranch}" branch and open a new PR targeting 'dev'`); } catch (error) {