@@ -15,35 +15,27 @@ const signale_1 = __importDefault(require("signale"));
1515const child_process_1 = require ( "child_process" ) ;
1616const misc_1 = require ( "./misc" ) ;
1717exports . clone = ( context ) => __awaiter ( this , void 0 , void 0 , function * ( ) {
18- signale_1 . default . info ( yield execAsync ( 'ls -lat' ) ) ;
1918 if ( misc_1 . isGitCloned ( ) )
2019 return ;
2120 const url = misc_1 . getGitUrl ( context ) ;
2221 const depth = misc_1 . getCloneDepth ( ) ;
2322 const workspace = misc_1 . getWorkspace ( ) ;
2423 yield execAsync ( `git -C ${ workspace } clone --depth=${ depth } ${ url } .` ) ;
2524 yield execAsync ( `git -C ${ workspace } fetch origin ${ context . ref } ` ) ;
26- signale_1 . default . info ( yield execAsync ( 'ls -lat' ) ) ;
2725 yield execAsync ( `git -C ${ workspace } checkout -qf ${ context . sha } ` ) ;
2826} ) ;
2927exports . runBuild = ( ) => __awaiter ( this , void 0 , void 0 , function * ( ) {
3028 const commands = misc_1 . getBuildCommands ( ) ;
3129 if ( ! commands . length )
3230 return ;
33- const current = process . cwd ( ) ;
34- const workspace = misc_1 . getWorkspace ( ) ;
35- signale_1 . default . info ( 'workspace=%s' , workspace ) ;
36- signale_1 . default . info ( 'current=%s' , current ) ;
37- yield execAsync ( `cd ${ workspace } ` ) ;
3831 for ( const command of commands ) {
3932 yield execAsync ( command ) ;
4033 }
41- yield execAsync ( `cd ${ current } ` ) ;
4234} ) ;
4335exports . getDiffFiles = ( ) => __awaiter ( this , void 0 , void 0 , function * ( ) {
4436 const workspace = misc_1 . getWorkspace ( ) ;
4537 yield execAsync ( `git -C ${ workspace } add --all --force` ) ;
46- yield execAsync ( `git -C ${ workspace } status --short -uno` ) ;
38+ signale_1 . default . info ( yield execAsync ( `git -C ${ workspace } status --short -uno` ) ) ;
4739 return ( yield execAsync ( `git -C ${ workspace } status --short -uno` ) ) . split ( / \r \n | \n / ) . filter ( line => line . match ( / ^ [ M D A ] \s + / ) ) . map ( line => line . replace ( / ^ [ M D A ] \s + / , '' ) ) ;
4840} ) ;
4941const execAsync = ( command ) => new Promise ( ( resolve , reject ) => {
0 commit comments