Exemplo n.º 1
0
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
// The only thing i need to adjust. ;)
// Please always add the latest version number to the end
// Only have 5 releases here...
// If RC8 drops remove the install/data directory
//$versions = array('3.0.2', '3.0.3-RC1', '3.0.3', '3.0.4-RC1', '3.0.4', '3.0.5-RC1', '3.0.5', '3.0.6-RC1', '3.0.6-RC2', '3.0.6-RC3');
//$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7');
$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7-RC2', '3.0.7');
$verbose = false;
require 'build_helper.php';
$package = new build_package($versions, $verbose);
echo "Building Release Packages\n";
echo "Now all three package types (patch, files, release) are built as well as the update package (update).\n";
$package->begin_status('Remove temporary files');
// Cleanup...
$package->run_command('rm -Rv ' . $package->get('dest_dir'));
$package->run_command('rm -Rv ' . $package->get('diff_dir'));
$package->run_command('rm -Rv ' . $package->get('patch_directory'));
$package->run_command('rm -Rv ' . $package->get('files_directory'));
$package->run_command('rm -Rv ' . $package->get('update_directory'));
$package->run_command('rm -Rv ' . $package->get('release_directory'));
$package->begin_status('Create new directories');
// Make sure the directories got removed
while (file_exists($package->get('update_directory'))) {
    sleep(1);
}
if (!file_exists($package->get('dest_dir'))) {
    $package->run_command('mkdir ' . $package->get('dest_dir'));
}
Exemplo n.º 2
0
}
$versions = explode(',', $_SERVER['argv'][1]);
$versions = array_map('trim', $versions);
$verbose = true;
require 'build_helper.php';
$package = new build_package($versions, $verbose);
echo "Building Release Packages\n";
echo "Now all three package types (patch, files, release) are built as well as the update package (update).\n";
// Go trough all versions making a diff if we even have old versions
// For phpBB 3.0.x we might choose a different update method, rendering the things below useless...
if (sizeof($package->old_packages)) {
    chdir($package->locations['old_versions']);
    // This array is for holding the filenames change
    $diff_file_changes = array();
    foreach ($package->old_packages as $_package_name => $dest_package_filename) {
        $package->begin_status('Parsing patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
        // Parse this diff to determine file changes from the checked versions and save them
        $diff_file_changes[$_package_name] = $package->collect_diff_files($package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch', $_package_name);
    }
    // Now put those files determined within the correct directories
    foreach ($diff_file_changes as $_package_name => $file_contents) {
        $package->begin_status('Creating files-only informations for ' . $package->old_packages[$_package_name] . $package->get('new_version_number'));
        $dest_filename_dir = $package->get('files_directory') . '/' . $package->old_packages[$_package_name] . $package->get('new_version_number');
        if (!file_exists($dest_filename_dir)) {
            $package->run_command('mkdir ' . $dest_filename_dir);
        }
        // Now copy the file contents
        foreach ($file_contents['all'] as $file) {
            $source_filename = $package->get('dest_dir') . '/' . $file;
            $dest_filename = $dest_filename_dir . '/' . $file;
            // Create Directories along the way?