@@ -397,6 +397,7 @@ __webpack_require__.r(__webpack_exports__);
397397/* harmony export (binding) */ __webpack_require__ . d ( __webpack_exports__ , "execSyncQ" , function ( ) { return execSyncQ ; } ) ;
398398/* harmony export (binding) */ __webpack_require__ . d ( __webpack_exports__ , "grpSt" , function ( ) { return grpSt ; } ) ;
399399/* harmony export (binding) */ __webpack_require__ . d ( __webpack_exports__ , "grpEnd" , function ( ) { return grpEnd ; } ) ;
400+ /* harmony export (binding) */ __webpack_require__ . d ( __webpack_exports__ , "log" , function ( ) { return log ; } ) ;
400401/* harmony export (binding) */ __webpack_require__ . d ( __webpack_exports__ , "getInput" , function ( ) { return getInput ; } ) ;
401402
402403
@@ -408,17 +409,19 @@ const httpc = __webpack_require__(553)
408409
409410const { performance } = __webpack_require__ ( 630 )
410411
411- const yel = '\x1b[33m'
412- const blu = '\x1b[94m' // eslint-disable-line no-unused-vars
412+ const colors = {
413+ 'yel' : '\x1b[33m' ,
414+ 'blu' : '\x1b[94m'
415+ }
413416const rst = '\x1b[0m'
414417
415- const download = async ( uri , dest ) => {
418+ const download = async ( uri , dest , log = true ) => {
416419 // make sure the folder exists
417420 if ( ! fs . existsSync ( path . dirname ( dest ) ) ) {
418421 fs . mkdirSync ( path . dirname ( dest ) , { recursive : true } )
419422 }
420423
421- console . log ( `[command]Downloading:\n ${ uri } ` )
424+ if ( log ) { console . log ( `[command]Downloading:\n ${ uri } ` ) }
422425
423426 const http = new httpc . HttpClient ( 'MSP-Greg' , [ ] , {
424427 allowRetries : true ,
@@ -478,13 +481,17 @@ const execSyncQ = (cmd) => {
478481}
479482
480483const grpSt = ( desc ) => {
481- console . log ( `##[group]${ yel } ${ desc } ${ rst } ` )
484+ console . log ( `##[group]${ colors [ ' yel' ] } ${ desc } ${ rst } ` )
482485 return performance . now ( )
483486}
484487
485488const grpEnd = ( msSt ) => {
486489 const timeStr = ( ( performance . now ( ) - msSt ) / 1000 ) . toFixed ( 2 ) . padStart ( 6 )
487- console . log ( `::[endgroup]\n time: ${ timeStr } s` )
490+ console . log ( `::[endgroup]\n took ${ timeStr } s` )
491+ }
492+
493+ const log = ( logText , color = 'yel' ) => {
494+ console . log ( `${ colors [ color ] } ${ logText } ${ rst } ` )
488495}
489496
490497const getInput = ( name ) => core . getInput ( name ) . replace ( / [ ^ a - z _ \d . - ] + / gi, '' ) . trim ( ) . toLowerCase ( )
@@ -1644,6 +1651,8 @@ module.exports = require("fs");
16441651( async ( ) => {
16451652 const core = __webpack_require__ ( 276 )
16461653
1654+ const { performance } = __webpack_require__ ( 630 )
1655+
16471656 const common = __webpack_require__ ( 498 )
16481657
16491658 const platform = __webpack_require__ ( 87 ) . platform ( )
@@ -1657,8 +1666,12 @@ module.exports = require("fs");
16571666
16581667 if ( core . getInput ( 'ruby-version' ) !== '' ) {
16591668 const fn = `${ process . env . RUNNER_TEMP } \\setup_ruby.js`
1660- await common . download ( 'https://raw.githubusercontent.com/ruby/setup-ruby/v1/dist/index.js' , fn )
1669+ common . log ( ' Running ruby/setup-ruby' )
1670+ const msSt = performance . now ( )
1671+ await common . download ( 'https://raw.githubusercontent.com/ruby/setup-ruby/v1/dist/index.js' , fn , false )
16611672 await require ( fn ) . run ( )
1673+ const timeStr = ( ( performance . now ( ) - msSt ) / 1000 ) . toFixed ( 2 ) . padStart ( 6 )
1674+ console . log ( ` took ${ timeStr } s` )
16621675 }
16631676
16641677 let runner
0 commit comments