Skip to content

Commit c870712

Browse files
committed
asd
1 parent d0f2b9a commit c870712

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

scripts/pre-release.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ echo "> Build library"
4848
NODE_ENV=production pnpm build
4949

5050
echo "> Update package.json version"
51-
pnpm version $VERSION --no-git-tag-version --no-commit-hooks --allow-same-version
51+
node -e "
52+
const fs = require('fs');
53+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
54+
pkg.version = process.argv[1];
55+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
56+
console.log('Updated package.json version to', process.argv[1]);
57+
" $VERSION
5258

5359
echo "> Publish the npm package to the registry"
5460
pnpm publish --tag dev

scripts/release.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ echo "Build library"
1313
NODE_ENV=production pnpm build
1414

1515
echo "Update package.json version"
16-
pnpm version $VERSION --no-git-tag-version
16+
node -e "
17+
const fs = require('fs');
18+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
19+
pkg.version = process.argv[1];
20+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
21+
console.log('Updated package.json version to', process.argv[1]);
22+
" $VERSION
1723

1824
echo "Publish the npm package to the registry"
1925
pnpm publish

0 commit comments

Comments
 (0)