Пример #1
0
        $loc_files[] = $mod_file;
        foreach ($loc_files as $file) {
            $template = new I2CE_TemplateMeister();
            if (!$template->loadRootFile($file)) {
                echo "\tCould not load\n";
                continue;
            }
            if (!($res = $template->query('/I2CEConfiguration/metadata/version')) instanceof DOMNodeList || $res->length == 0) {
                echo "\tVersion not found\n";
                continue;
            }
            $versNode = $res->item(0);
            while ($versNode->hasChildNodes()) {
                $versNode->removeChild($versNode->firstChild);
            }
            $versNode->appendChild($template->createTextNode($new_version));
            file_put_contents($file, $template->getDisplay());
        }
    }
}
//end checking for changes since last release
$commit_changes = null;
$tag_release = null;
if ($do_versioning) {
    foreach ($top_mod_dirs as $mod => $dir) {
        $next_release = $last_release[$mod]['next_release'];
        $ret = 0;
        $out = array();
        $info = @exec("bzr status {$dir} 2> /dev/null", $out, $ret);
        if (count($out) > 0) {
            if (prompt("{$mod} has uncommitted changes. Commit them?\n[Assuming that {$mod} is bound to launchpad]", $commit_changes, implode("\n", $out))) {