protected function removeFailedRelease($worker, AbstractAuth $auth, $remote, $releaseDirname = null)
    {
        $releaseDir = is_null($releaseDirname)
            ? $remote['releasesdir'] . '/' . $remote['time']
            : $releaseDirname;
        return $this->taskSsh($worker, $auth)
            ->remoteDirectory($remote['rootdir'], true)
            ->exec('chown -R ' . $remote['user'] . ':' . $remote['user'] . ' ' . $releaseDir)
            ->exec('chmod -R a+rwx ' . $releaseDir)
            ->exec('rm -rf ' . $releaseDir);
    }
protected function removeFailedRelease($worker, AbstractAuth $auth, $remote, $releaseDirname = null)
    {
        $releaseDir = is_null($releaseDirname)
            ? $remote['releasesdir'] . '/' . $remote['time']
            : $releaseDirname;
        return $this->taskSsh($worker, $auth)
            ->remoteDirectory($remote['rootdir'], true)
            ->exec('chown -R ' . $remote['user'] . ':' . $remote['user'] . ' ' . $releaseDir)
            ->exec('chmod -R a+rwx ' . $releaseDir)
            ->exec('rm -rf ' . $releaseDir);
    }
protected function removeFailedRelease ( $ worker , AbstractAuth $ auth , $ remote , $ releaseDirname = null ) { $ releaseDir = is_null ( $ releaseDirname ) ? $ remote [ 'releasesdir' ] . '/' . $ remote [ 'time' ] : $ releaseDirname ; return $ this -> taskSsh ( $ worker , $ auth ) -> remoteDirectory ( $ remote [ 'rootdir' ] , true ) -> exec ( 'chown -R ' . $ remote [ 'user' ] . ':' . $ remote [ 'user' ] . ' ' . $ releaseDir ) -> exec ( 'chmod -R a+rwx ' . $ releaseDir ) -> exec ( 'rm -rf ' . $ releaseDir ) ; }
Remove a failed release from the server.

@param string $worker
The server to install the site on.
@param \DigipolisGent\Robo\Task\Deploy\Ssh\Auth\AbstractAuth $auth
The ssh authentication to connect to the server.
@param array $remote
The remote settings for this server.
@param string|null $releaseDirname
The path of the release dir to remove.

@return \Robo\Contract\TaskInterface
The remove release task.
Remove a failed release from the server .