Пример #1
0
function main()
{
    $options = BoostSiteTools\CommandLineOptions::parse(SET_RELEASE_STATUS_USAGE);
    if (!count($options->positional)) {
        echo $options->usage_message();
        exit(1);
    }
    $version = BoostVersion::from($options->positional[0]);
    $releases = new BoostReleases(__DIR__ . '/../generated/state/release.txt');
    $releases->setReleaseStatus($version, 'released');
    $releases->save();
}
Пример #2
0
function main()
{
    $options = BoostSiteTools\CommandLineOptions::parse(LOAD_RELEASE_DATA_USAGE);
    if (count($options->positional) != 1) {
        echo $options->usage_message();
        exit(1);
    }
    $path = realpath($options->positional[0]);
    if (!$path) {
        echo "Unable to find release file: {$options->positional[0]}\n";
        exit(1);
    }
    $release_details = file_get_contents($path);
    if (!$release_details) {
        echo "Error reading release file: {$options->positional[0]}\n";
        exit(1);
    }
    $releases = new BoostReleases(__DIR__ . '/../generated/state/release.txt');
    $releases->loadReleaseInfo($release_details);
    $releases->save();
}
Пример #3
0
function main()
{
    BoostSiteTools\CommandLineOptions::parse();
    $path = realpath(STATIC_DIR);
    if (!$path || !is_dir($path)) {
        echo "Unable to find documentation directory\n";
        exit(1);
    }
    $releases = new BoostReleases(__DIR__ . '/../generated/state/release.txt');
    foreach (new DirectoryIterator(STATIC_DIR) as $dir) {
        if ($dir->isDot()) {
            continue;
        }
        $name = $dir->getFilename();
        if ($name == 'develop' || $name == 'master') {
            // Store this somewhere?
        } else {
            if (preg_match('@^boost_[0-9_]+$@', $name)) {
                $releases->addDocumentation(BoostVersion::from($name), "/doc/libs/{$name}");
            }
        }
    }
    $releases->save();
}