Ejemplo n.º 1
0
            $command = 'clear-caches';
            break;
    }
}
if (!$command) {
    show_usage();
    exit(0);
}
require_once 'pre.php';
switch ($command) {
    case 'clear-caches':
        $site_cache = new SiteCache(new Log_ConsoleLogger());
        $site_cache->invalidatePluginBasedCaches();
        break;
    case 'version':
        show_version();
        break;
    default:
        show_usage();
}
function show_usage()
{
    echo <<<EOT
Usage: tuleap COMMAND

Tuleap administration command line

Options:

    -h, --help          Print usage
    -v, --version       Tuleap version
Ejemplo n.º 2
0
function show_platform($short_name, $p, $dev)
{
    global $min_version;
    global $max_version;
    $long_name = $p["name"];
    $description = $p["description"];
    if (array_key_exists('url', $p)) {
        $url = $p["url"];
        $long_name .= " <a href={$url}><span class=description>details</span></a>";
    }
    list_bar($long_name, $description);
    foreach ($p["versions"] as $i => $v) {
        if ($min_version && version_compare($v['num'], $min_version, "<")) {
            continue;
        }
        if ($max_version && version_compare($v['num'], $max_version, ">")) {
            continue;
        }
        if (!$dev && is_dev($v)) {
            continue;
        }
        show_version($short_name, $i, $v);
    }
}