public function getReleases()
    {
        // Get releases on server
        $connection = $this->connections->getCurrentConnectionKey()->toHandle();
        if (!array_key_exists($connection, $this->releases)) {
            $releases = $this->paths->getReleasesFolder();
            $releases = (array) $this->bash->listContents($releases);

            // Filter and sort releases
            $releases = array_filter($releases, function ($release) {
                return $this->isRelease($release);
            });

            rsort($releases);

            $this->releases[$connection] = (array) $releases;
        }

        return $this->releases[$connection];
    }