@@ -15,14 +15,14 @@ export const OTHER = 0;
1515/** Executes a command and returns stdout. */
1616export function exec ( cmd , args = [ ] , options = { } ) {
1717 const res = spawnSync ( cmd , args , options ) ;
18- if ( res . status != 0 ) throw Error ( `command '${ cmd } ${ args . join ( " " ) } ' failed with code ${ res . status } : ${ res . stderr . toString ( ) } ` ) ;
18+ if ( res . status != 0 ) throw Error ( `command '${ cmd } ' failed with code ${ res . status } : ${ res . stderr . toString ( ) } ` ) ;
1919 return res . stdout . toString ( ) . trim ( ) ;
2020}
2121
2222/** Just runs a command. */
2323export function run ( cmd , args = [ ] ) {
2424 const res = spawnSync ( cmd , args , { stdio : "inherit" } ) ;
25- if ( res . status != 0 ) throw Error ( `command '${ cmd } ${ args . join ( " " ) } ' failed with code ${ res . status } ` ) ;
25+ if ( res . status != 0 ) throw Error ( `command '${ cmd } ' failed with code ${ res . status } ` ) ;
2626}
2727
2828/** Gets existing versions sorted from newest to oldest. */
@@ -248,7 +248,7 @@ export function publishRelease(nextVersion, commit, notes) {
248248/** Publishes the package to npm. */
249249export function publishPackage ( version ) {
250250 const token = getNpmToken ( ) ;
251- run ( "npm" , [ "version" , version ] ) ;
252- run ( "npm" , [ "npm" , " config", "set" , `//registry.npmjs.org/:_authToken=${ token } ` ] ) ;
251+ run ( "npm" , [ "version" , version , "--no-git-tag-version" ] ) ;
252+ run ( "npm" , [ "config" , "set" , `//registry.npmjs.org/:_authToken=${ token } ` ] ) ;
253253 run ( "npm" , [ "publish" , "--access" , "public" ] ) ;
254254}
0 commit comments