File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ const build = () => {
191191 */
192192const test = ( ) => {
193193 const workers = os . cpus ( ) . length || 1 ;
194- log ( chalk . magenta ( `--- STEP 4 : TEST ---` ) ) ;
194+ log ( chalk . magenta ( `--- STEP 5 : TEST ---` ) ) ;
195195 runCmd ( `${ binary ( 'jest' ) } -w ${ workers } ` ) ;
196196} ;
197197
@@ -208,16 +208,23 @@ const test = () => {
208208 * - If the `argv.loglevel` flag is provided, the specified log level will be included in the publishing command.
209209 */
210210const release = ( ) => {
211- log ( chalk . magenta ( '--- STEP 5: VERSION PACKAGES ---' ) ) ;
211+ if ( argv . next ) {
212+ log ( chalk . magenta ( '--- STEP 6: NEXT/CANARY RELEASE ---' ) ) ;
213+ let releaseCmd = 'npx lerna publish --canary --preid next --dist-tag next --include-merged-tags --yes' ;
214+ if ( argv . loglevel ) releaseCmd += ` --loglevel ${ argv . loglevel } ` ;
215+ runCmd ( releaseCmd ) ;
216+ return ;
217+ }
218+
219+ log ( chalk . magenta ( '--- STEP 6: VERSION PACKAGES ---' ) ) ;
212220 runCmd ( 'npx lerna version --conventional-commits --yes' ) ;
213221
214- log ( chalk . magenta ( '--- STEP 6 : PUBLISH PACKAGES ---' ) ) ;
222+ log ( chalk . magenta ( '--- STEP 7 : PUBLISH PACKAGES ---' ) ) ;
215223 let releaseCmd = 'npx lerna publish from-git --yes' ;
216- if ( argv . next ) releaseCmd += ' --canary --preid next --dist-tag next' ;
217224 if ( argv . loglevel ) releaseCmd += ` --loglevel ${ argv . loglevel } ` ;
218225 runCmd ( releaseCmd ) ;
219226
220- log ( chalk . magenta ( '--- STEP 7 : PUSH TAGS ---' ) ) ;
227+ log ( chalk . magenta ( '--- STEP 8 : PUSH TAGS ---' ) ) ;
221228 runCmd ( `git push origin ${ getCurrentBranch ( ) } --follow-tags` ) ;
222229} ;
223230
You can’t perform that action at this time.
0 commit comments