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' ;
2
1
import { prerelease } from 'semver' ;
3
2
import { packages } from '../../../../lib/packages' ;
4
3
import { npm } from '../utils/process' ;
5
4
6
5
export 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
+ ] ;
10
15
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' ) ;
29
19
}
20
+
21
+ await npm ( ...publishArgs ) ;
30
22
}
You can’t perform that action at this time.
0 commit comments