protected static function getUniqueReleaseName($release)
    {
        // Prevent duplicate release names
        $i = 0;
        $releaseName = $release;
        $cmdTemplate = '[ -d {{deploy_path}}/releases/%s ]';
        $cmd = sprintf($cmdTemplate, $releaseName);
        while (\Deployer\test($cmd)) {
            $releaseName = $release . '-' . ++$i;
            $cmd = sprintf($cmdTemplate, $releaseName);
        }

        return $releaseName;
    }