From 9b1a534f88ac801c109a93166f6682fa42c65e7b Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sun, 17 Mar 2024 11:51:18 +0100 Subject: [PATCH] Fixed release script. --- bin/release.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/release.ts b/bin/release.ts index 22decc301..5468fc568 100644 --- a/bin/release.ts +++ b/bin/release.ts @@ -149,14 +149,16 @@ try { console.log(`Bumping ${release} version (to ${newVersion})...`); pkg.version = newVersion; - writeJson('./src/package.json', pkg); + run(`echo "$(jq '. += {"version": "'${newVersion}'"}' src/package.json)" > src/package.json`) + run(`echo "$(jq '. += {"version": "'${newVersion}'"}' admin/package.json)" > admin/package.json`) + run(`echo "$(jq '. += {"version": "'${newVersion}'"}' bin/package.json)" > bin/package.json`) + run(`echo "$(jq '. += {"version": "'${newVersion}'"}' ./package.json)" > ./package.json`) // run npm version `release` where release is patch, minor or major - run('pnpm install', {cwd: 'src/'}); + run('pnpm install'); // run npm install --package-lock-only <-- required??? - run('git add src/package.json'); - run('git add src/package-lock.json'); + run('git add -A'); run('git commit -m "bump version"'); console.log('Switching to master...'); run('git checkout master');