File tree Expand file tree Collapse file tree 2 files changed +2
-20
lines changed
Expand file tree Collapse file tree 2 files changed +2
-20
lines changed Original file line number Diff line number Diff line change 1818 },
1919 "dependencies" : {
2020 "@tunnckocore/execa" : " ^2.1.2" ,
21- "@tunnckocore/package-json" : " ^1.0.1" ,
2221 "dedent" : " ^0.7.0" ,
2322 "detect-next-version" : " ^3.1.0" ,
2423 "esm" : " ^3.0.84" ,
Original file line number Diff line number Diff line change @@ -2,39 +2,22 @@ import fs from 'fs';
22import util from 'util' ;
33import path from 'path' ;
44import proc from 'process' ;
5- import getPkg from '@tunnckocore/package-json' ;
65import { exec } from '@tunnckocore/execa' ;
76import isCI from 'is-ci' ;
87import ded from 'dedent' ;
98
109import release from './index' ;
1110
1211export default function releaseCli ( pkg , argv ) {
13- return getPkg ( pkg . name )
14- . then ( ( { version } ) => ( version !== pkg . version ? version : false ) )
15- . catch ( ( err ) => {
16- console . debug ( `Error getting package metadata from the registry: ${ err } ` ) ;
17- console . debug ( "Don't worry, that is a check for latest cli version." ) ;
18- } )
19- . then ( ( latestVersion ) => {
20- if ( latestVersion ) {
21- console . log ( `UPDATE AVAILABLE: v${ latestVersion } ` ) ;
22- console . log (
23- 'See:' ,
24- `https://github.com/${ pkg . repository } /releases/tag/v${ latestVersion } ` ,
25- ) ;
26- console . log ( '' ) ;
27- }
12+ return release ( argv )
13+ . then ( async ( result ) => {
2814 if ( argv . ci && ! isCI ) {
2915 console . error ( 'Publishing is only allowed on CI services!' ) ;
3016 console . error (
3117 'Try passing --no-ci flag to bypass this, if you are sure.' ,
3218 ) ;
3319 proc . exit ( 1 ) ;
3420 }
35- } )
36- . then ( ( ) => release ( argv ) )
37- . then ( async ( result ) => {
3821 if ( argv . dry ) {
3922 console . log ( JSON . stringify ( result , null , 2 ) ) ;
4023 console . log ( argv ) ;
You can’t perform that action at this time.
0 commit comments