Skip to content

Commit f5251b6

Browse files
author
Thomas Draier
authored
Fix publish script (#235)
1 parent b350e3c commit f5251b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/scripts/publish.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ spawnSync('yarn', ['auto', 'changelog', '--from', previous]);
5757

5858
// Bump version
5959
console.log('Auto version change : ' + versionChange);
60-
const npmVersionProcess = spawnSync('npm', ['version', versionChange]);
61-
const newVersion = npmVersionProcess.stdout.toString().split(/\r?\n/)[0];
60+
const npmVersionProcess = spawnSync('yarn', ['version', '--no-git-tag-version', `--${versionChange}`]);
61+
const res = npmVersionProcess.stdout.toString().split(/\r?\n/)[1];
62+
const newVersion = 'v' + res.substring(res.indexOf(': ') + 2);
6263
let tag = projectName + '-' + newVersion;
6364
console.log('Will release ' + tag);
6465

0 commit comments

Comments
 (0)