File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -183,17 +183,25 @@ async function runGithubRelease(opts: ReleaseOptions) {
183183
184184 logger . success ( `${ chalk . blue ( pkg . name ) } github release: ${ chalk . green ( repoUrl . toString ( ) ) } ` ) ;
185185
186- console . log ( ) ;
187- logger . success (
188- `${ chalk . blue ( pkg . name ) } npm sync: ${ chalk . green ( `https://npmmirror.com/sync/${ pkg . name } ` ) } ` ,
189- ) ;
190- console . log ( ) ;
186+ if ( ! opts . dryRun ) {
187+ await open ( repoUrl . toString ( ) ) ;
188+ }
189+
191190 logger . success (
192191 `${ chalk . blue ( pkg . name ) } npm site: ${ chalk . green ( `https://www.npmjs.com/package/${ pkg . name } ` ) } ` ,
193192 ) ;
194193
195- if ( ! opts . dryRun ) {
196- await open ( repoUrl . toString ( ) ) ;
194+ const author = pkg . packageJson . author ;
195+ if ( author ) {
196+ if ( ( typeof author === 'string' && author . includes ( 'tom@tomgao.cc' ) )
197+ || ( typeof author === 'object' && author . email && author . email . includes ( 'tom@tomgao.cc' ) ) ) {
198+ try {
199+ await run ( `cnpm sync ${ pkg . name } ` , { spinner : 'sync to npmmirror.com' } ) ;
200+ }
201+ catch ( e ) {
202+ logger . error ( e ) ;
203+ }
204+ }
197205 }
198206 }
199207}
You can’t perform that action at this time.
0 commit comments