File tree Expand file tree Collapse file tree 1 file changed +14
-22
lines changed
tests/legacy-cli/e2e/setup Expand file tree Collapse file tree 1 file changed +14
-22
lines changed Original file line number Diff line number Diff line change 1- import * as fs from 'fs' ;
21import { prerelease } from 'semver' ;
32import { packages } from '../../../../lib/packages' ;
43import { npm } from '../utils/process' ;
54
65export default async function ( ) {
7- const pre = prerelease ( packages [ '@angular/cli' ] . version ) ;
8-
9- fs . writeFileSync ( '.npmrc' , 'registry = http://localhost:4873' , 'utf8' ) ;
6+ const publishArgs = [
7+ 'run' ,
8+ 'admin' ,
9+ '--' ,
10+ 'publish' ,
11+ '--versionCheck=false' ,
12+ '--branchCheck=false' ,
13+ '--registry=http://localhost:4873' ,
14+ ] ;
1015
11- try {
12- const publishArgs = [
13- 'run' ,
14- 'admin' ,
15- '--' ,
16- 'publish' ,
17- '--versionCheck' ,
18- 'false' ,
19- '--branchCheck' ,
20- 'false' ,
21- ] ;
22- if ( pre && pre . length > 0 ) {
23- publishArgs . push ( '--tag' ) ;
24- publishArgs . push ( 'next' ) ;
25- }
26- await npm ( ...publishArgs ) ;
27- } finally {
28- fs . unlinkSync ( '.npmrc' ) ;
16+ const pre = prerelease ( packages [ '@angular/cli' ] . version ) ;
17+ if ( pre && pre . length > 0 ) {
18+ publishArgs . push ( '--tag' , 'next' ) ;
2919 }
20+
21+ await npm ( ...publishArgs ) ;
3022}
You can’t perform that action at this time.
0 commit comments