@@ -13,13 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
1313} ;
1414Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1515const os_1 = __importDefault ( require ( "os" ) ) ;
16- const fs_1 = require ( "fs" ) ;
1716const path_1 = __importDefault ( require ( "path" ) ) ;
17+ const fs_1 = require ( "fs" ) ;
1818const url_1 = require ( "url" ) ;
1919const util_1 = require ( "util" ) ;
20- const core_1 = __importDefault ( require ( "@actions/core" ) ) ;
21- const io_1 = __importDefault ( require ( "@actions/io" ) ) ;
22- const exec_1 = __importDefault ( require ( "@actions/exec" ) ) ;
20+ const core_1 = require ( "@actions/core" ) ;
21+ const io_1 = require ( "@actions/io" ) ;
22+ const exec_1 = require ( "@actions/exec" ) ;
2323const cache_1 = require ( "@actions/cache" ) ;
2424const linuxplatform_1 = __importDefault ( require ( "./platforms/linuxplatform" ) ) ;
2525const androidplatform_1 = __importDefault ( require ( "./platforms/androidplatform" ) ) ;
@@ -73,44 +73,44 @@ let Installer = /** @class */ (() => {
7373 // try to get Qt from cache, unless clean is specified
7474 let toolPath = null ;
7575 if ( clean != "true" ) {
76- core_1 . default . debug ( `Trying to restore Qt from cache with key: ${ this . _cacheKey } ` ) ;
76+ core_1 . debug ( `Trying to restore Qt from cache with key: ${ this . _cacheKey } ` ) ;
7777 const hitKey = yield cache_1 . restoreCache ( [ Installer . CacheDir ] , this . _cacheKey ) ;
7878 if ( hitKey && ( yield exists ( path_1 . default . join ( Installer . CacheDir , "bin" , this . _platform . qmakeName ( ) ) ) ) ) {
7979 toolPath = path_1 . default . resolve ( Installer . CacheDir ) ;
80- core_1 . default . debug ( `Restored Qt from cache to path: ${ toolPath } ` ) ;
80+ core_1 . debug ( `Restored Qt from cache to path: ${ toolPath } ` ) ;
8181 }
8282 }
8383 // download, extract, cache
8484 if ( ! toolPath ) {
85- core_1 . default . debug ( 'Downloading and installing Qt' ) ;
85+ core_1 . debug ( 'Downloading and installing Qt' ) ;
8686 toolPath = yield this . acquireQt ( this . parseList ( packages , ',' ) , this . parseList ( deepSrc , ' ' ) , this . parseList ( flatSrc , ' ' ) ) ;
87- core_1 . default . debug ( `Caching Qt with key: ${ this . _cacheKey } ` ) ;
87+ core_1 . debug ( `Caching Qt with key: ${ this . _cacheKey } ` ) ;
8888 yield this . _platform . runPostInstall ( false , toolPath ) ;
8989 yield cache_1 . saveCache ( [ toolPath ] , this . _cacheKey ) ;
9090 }
9191 else
9292 yield this . _platform . runPostInstall ( true , toolPath ) ;
93- core_1 . default . info ( 'Using Qt installation: ' + toolPath ) ;
93+ core_1 . info ( 'Using Qt installation: ' + toolPath ) ;
9494 // generate qdep prf
9595 yield this . generateQdepPrf ( toolPath ) ;
9696 // update output / env vars
97- core_1 . default . setOutput ( "qtdir" , toolPath ) ;
98- core_1 . default . addPath ( path_1 . default . join ( toolPath , "bin" ) ) ;
97+ core_1 . setOutput ( "qtdir" , toolPath ) ;
98+ core_1 . addPath ( path_1 . default . join ( toolPath , "bin" ) ) ;
9999 this . _platform . addExtraEnvVars ( toolPath ) ;
100100 // log stuff
101- yield exec_1 . default . exec ( "qmake" , [ "-version" ] ) ;
102- yield exec_1 . default . exec ( "qmake" , [ "-query" ] ) ;
101+ yield exec_1 . exec ( "qmake" , [ "-version" ] ) ;
102+ yield exec_1 . exec ( "qmake" , [ "-query" ] ) ;
103103 // set outputs
104- core_1 . default . setOutput ( "shell" , this . _platform . shellName ( ) ) ;
105- core_1 . default . setOutput ( "make" , this . _platform . makeName ( ) ) ;
106- core_1 . default . setOutput ( "tests" , String ( this . shouldTest ( ) ) ) ;
107- core_1 . default . setOutput ( "testflags" , this . _platform . testFlags ( ) ) ;
104+ core_1 . setOutput ( "shell" , this . _platform . shellName ( ) ) ;
105+ core_1 . setOutput ( "make" , this . _platform . makeName ( ) ) ;
106+ core_1 . setOutput ( "tests" , String ( this . shouldTest ( ) ) ) ;
107+ core_1 . setOutput ( "testflags" , this . _platform . testFlags ( ) ) ;
108108 // set install dir, create artifact symlink
109109 const iPath = this . _platform . installDirs ( toolPath ) ;
110- yield io_1 . default . mkdirP ( iPath [ 0 ] ) ;
110+ yield io_1 . mkdirP ( iPath [ 0 ] ) ;
111111 const instPath = path_1 . default . join ( iPath [ 0 ] , os_1 . default . platform ( ) == "win32" ? toolPath . substr ( 3 ) : toolPath . substr ( 1 ) , ".." , ".." ) ;
112- core_1 . default . setOutput ( 'outdir' , instPath ) ;
113- core_1 . default . setOutput ( 'installdir' , iPath [ 1 ] ) ;
112+ core_1 . setOutput ( 'outdir' , instPath ) ;
113+ core_1 . setOutput ( 'installdir' , iPath [ 1 ] ) ;
114114 } ) ;
115115 }
116116 parseList ( list , seperator ) {
@@ -139,12 +139,12 @@ let Installer = /** @class */ (() => {
139139 }
140140 installQdep ( ) {
141141 return __awaiter ( this , void 0 , void 0 , function * ( ) {
142- const pythonPath = yield io_1 . default . which ( 'python' , true ) ;
143- core_1 . default . debug ( `Using python: ${ pythonPath } ` ) ;
144- yield exec_1 . default . exec ( pythonPath , [ "-m" , "pip" , "install" , "qdep" ] ) ;
145- const qdepPath = yield io_1 . default . which ( 'qdep' , true ) ;
146- yield exec_1 . default . exec ( qdepPath , [ "--version" ] ) ;
147- core_1 . default . info ( "Installed qdep" ) ;
142+ const pythonPath = yield io_1 . which ( 'python' , true ) ;
143+ core_1 . debug ( `Using python: ${ pythonPath } ` ) ;
144+ yield exec_1 . exec ( pythonPath , [ "-m" , "pip" , "install" , "qdep" ] ) ;
145+ const qdepPath = yield io_1 . which ( 'qdep' , true ) ;
146+ yield exec_1 . exec ( qdepPath , [ "--version" ] ) ;
147+ core_1 . info ( "Installed qdep" ) ;
148148 } ) ;
149149 }
150150 acquireQt ( packages , deepSrc , flatSrc ) {
@@ -156,7 +156,7 @@ let Installer = /** @class */ (() => {
156156 for ( const src of flatSrc )
157157 yield this . _downloader . addSource ( new url_1 . URL ( src ) , false ) ;
158158 // add packages
159- core_1 . default . debug ( `Available modules: ${ this . _downloader . modules ( ) . join ( ", " ) } ` ) ;
159+ core_1 . debug ( `Available modules: ${ this . _downloader . modules ( ) . join ( ", " ) } ` ) ;
160160 for ( const pkg of this . _platform . extraTools ( ) )
161161 this . _downloader . addDownload ( pkg , true ) ;
162162 for ( const pkg of packages )
@@ -168,22 +168,22 @@ let Installer = /** @class */ (() => {
168168 // move tools
169169 const oldToolPath = path_1 . default . join ( installPath , "Tools" ) ;
170170 if ( yield exists ( oldToolPath ) )
171- yield io_1 . default . mv ( oldToolPath , path_1 . default . join ( dataPath , "Tools" ) ) ;
171+ yield io_1 . mv ( oldToolPath , path_1 . default . join ( dataPath , "Tools" ) ) ;
172172 // move out of install dir to seperate dir
173- yield io_1 . default . rmRF ( Installer . CacheDir ) ;
174- yield io_1 . default . mv ( dataPath , Installer . CacheDir ) ;
173+ yield io_1 . rmRF ( Installer . CacheDir ) ;
174+ yield io_1 . mv ( dataPath , Installer . CacheDir ) ;
175175 // remove tmp installation to free some space
176- yield io_1 . default . rmRF ( installPath ) ;
176+ yield io_1 . rmRF ( installPath ) ;
177177 return Installer . CacheDir ;
178178 } ) ;
179179 }
180180 generateQdepPrf ( installPath ) {
181181 return __awaiter ( this , void 0 , void 0 , function * ( ) {
182182 // add qdep prf file
183183 const qmakePath = path_1 . default . join ( installPath , "bin" , this . _platform . qmakeName ( ) ) ;
184- const qdepPath = yield io_1 . default . which ( 'qdep' , true ) ;
185- yield exec_1 . default . exec ( qdepPath , [ "prfgen" , "--qmake" , qmakePath ] ) ;
186- core_1 . default . info ( "Successfully prepared qdep" ) ;
184+ const qdepPath = yield io_1 . which ( 'qdep' , true ) ;
185+ yield exec_1 . exec ( qdepPath , [ "prfgen" , "--qmake" , qmakePath ] ) ;
186+ core_1 . info ( "Successfully prepared qdep" ) ;
187187 } ) ;
188188 }
189189 shouldTest ( ) {
0 commit comments