protected function updateCode() : array
    {
        $output = [];
        $returnValue = 0;

        $updateMaster = 'ls'; // dummy

        if ($this->getBranch() !== 'master') {
            $updateMaster = ' git checkout master && git pull && git checkout '.$this->getBranch().' ';
        }

        $commands = [
            'git reset --hard HEAD',
            'git pull',
            $updateMaster,
            'composer install --no-dev',
            'yarn install --production',
        ];

        foreach ($commands as $command) {
            exec('cd '.$this->getBasepath().' && '.$command, $output, $returnValue);
        }

        return [
            'output'      => $output,
            'returnValue' => $returnValue,
        ];
    }
protected function updateCode() : array
    {
        $output = [];
        $returnValue = 0;

        $updateMaster = 'ls'; // dummy

        if ($this->getBranch() !== 'master') {
            $updateMaster = ' git checkout master && git pull && git checkout '.$this->getBranch().' ';
        }

        $commands = [
            'git reset --hard HEAD',
            'git pull',
            $updateMaster,
            'composer install --no-dev',
            'yarn install --production',
        ];

        foreach ($commands as $command) {
            exec('cd '.$this->getBasepath().' && '.$command, $output, $returnValue);
        }

        return [
            'output'      => $output,
            'returnValue' => $returnValue,
        ];
    }
protected function updateCode ( ) : array { $ output = [ ] ; $ returnValue = 0 ; $ updateMaster = 'ls' ; // dummy if ( $ this -> getBranch ( ) !== 'master' ) { $ updateMaster = ' git checkout master && git pull && git checkout ' . $ this -> getBranch ( ) . ' ' ; } $ commands = [ 'git reset --hard HEAD' , 'git pull' , $ updateMaster , 'composer install --no-dev' , 'yarn install --production' , ] ; foreach ( $ commands as $ command ) { exec ( 'cd ' . $ this -> getBasepath ( ) . ' && ' . $ command , $ output , $ returnValue ) ; } return [ 'output' => $ output , 'returnValue' => $ returnValue , ] ; }
Executes the actual deployment commands.

@return array
Executes the actual deployment commands .