protected static function initReleaseName()
    {
        // Ensure the release-name is unique otherwise there are weird consequences in deployer
        // them being dep/releases with wrong versions, deployments to same release, …
        $release = \Deployer\get('release_name');

        $isVersion = version_compare($release, '0.0.1', '>=');
        if ($isVersion === true) {
            $releaseName = self::getUniqueReleaseName($release);
        } else {
            $releaseClean = self::cleanString($release);
            $doUseTimestamp = (bool)\Deployer\get('release_name_usetimestamp');
            if($doUseTimestamp) {
                $releaseName = $releaseClean . '-' . date('YmdHis');
            }
            else {
                $releaseName = self::getUniqueReleaseName($releaseClean . '-branch');
            }
        }

        \Deployer\set('release_name', $releaseName);
        \Deployer\writeln("Deploying $releaseName to releases/$releaseName");
    }