@@ -11,47 +11,39 @@ import { handlePrereleaseChangelog, handleRegularReleaseChangelog } from './chan
1111( async ( ) => {
1212 const options = await parseReleaseCliOptions ( ) ;
1313 const graph = await createProjectGraphAsync ( { exitOnError : true } ) ;
14- const { tag, preid, isPrerelease } = parseReleaseOptions ( options ) ;
14+ const { publishOnly, projects, verbose, otp } = options ;
15+ const { tag, preid, isPrerelease, dryRun } = parseReleaseOptions ( options ) ;
1516
16- const releaseEnabled = process . env . RELEASE_ENABLED === '1' || process . env . RELEASE_ENABLED === 'true' ;
17-
18- console . info (
19- printHeader ( 'release' , 'yellow' ) ,
20- `Live release enabled? ${ releaseEnabled ? chalk . green ( 'Yes' ) : chalk . red ( 'No' ) } (RELEASE_ENABLED=${
21- process . env . RELEASE_ENABLED
22- } )\n`
23- ) ;
24-
25- let projectsList : string [ ] = options . projects ?? [ ] ;
17+ let projectsList : string [ ] = projects ?? [ ] ;
2618
2719 // Create new version and update changelog if not only publishing
28- if ( options . publishOnly ) {
20+ if ( publishOnly ) {
2921 console . log ( printHeader ( 'mode' , 'cyanBright' ) , `Publish only, skipping version and changelog\n` ) ;
3022 } else {
3123 if ( isPrerelease ) {
3224 const versionData = await handlePrereleaseVersioning ( {
3325 preid,
34- projects : options . projects ,
35- dryRun : options . dryRun ,
36- verbose : options . verbose ,
26+ projects,
27+ dryRun,
28+ verbose,
3729 } ) ;
3830 await handlePrereleaseChangelog ( {
3931 versionData,
40- dryRun : options . dryRun ,
41- verbose : options . verbose ,
32+ dryRun,
33+ verbose,
4234 } ) ;
4335 } else {
4436 const versionData = await handleRegularReleaseVersioning ( {
4537 preid,
46- projects : options . projects ,
47- dryRun : options . dryRun ,
48- verbose : options . verbose ,
38+ projects : projects ,
39+ dryRun,
40+ verbose,
4941 } ) ;
5042
5143 await handleRegularReleaseChangelog ( {
5244 versionData,
53- dryRun : options . dryRun ,
54- verbose : options . verbose ,
45+ dryRun,
46+ verbose,
5547 } ) ;
5648 }
5749 }
@@ -61,12 +53,12 @@ import { handlePrereleaseChangelog, handleRegularReleaseChangelog } from './chan
6153
6254 // The returned number value from releasePublish will be zero if all projects are published successfully, non-zero if not
6355 const publishProjectsResult = await releasePublish ( {
64- dryRun : options . dryRun ,
65- verbose : options . verbose ,
56+ dryRun,
57+ verbose,
6658 projects : projectsList ,
6759 tag,
6860 registry : 'https://registry.npmjs.org/' ,
69- otp : options . otp ,
61+ otp,
7062 } ) ;
7163
7264 const publishStatus = Object . values ( publishProjectsResult ) . reduce ( ( sum , { code } ) => sum + code , 0 ) ;
0 commit comments