public function getPreviousRelease($release = null)
    {
        // Get all releases and the current one
        $releases = $this->getReleases();
        $current = $release ?: $this->getCurrentRelease();

        // Get the one before that, or default to current
        $key = array_search($current, $releases, true);
        $key = !is_int($key) ? -1 : $key;
        $next = 1;
        do {
            $release = Arr::get($releases, $key + $next);
            ++$next;
        } while (!$this->checkReleaseState($release) && isset($this->state[$release]));

        return $release ?: $current;
    }