aboutsummaryrefslogtreecommitdiffstats
path: root/build/package.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/package.php')
-rwxr-xr-xbuild/package.php39
1 files changed, 20 insertions, 19 deletions
diff --git a/build/package.php b/build/package.php
index d168957ca5..18798d0602 100755
--- a/build/package.php
+++ b/build/package.php
@@ -33,7 +33,7 @@ echo "Now all three package types (patch, files, release) are built as well as t
// 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))
+if (count($package->old_packages))
{
chdir($package->locations['old_versions']);
@@ -76,7 +76,7 @@ if (sizeof($package->old_packages))
// Create Directories along the way?
$file = explode('/', $file);
// Remove filename portion
- $file[sizeof($file)-1] = '';
+ $file[count($file)-1] = '';
chdir($dest_filename_dir);
foreach ($file as $entry)
@@ -169,7 +169,7 @@ if (sizeof($package->old_packages))
// Create Directories along the way?
$file = explode('/', $file);
// Remove filename portion
- $file[sizeof($file)-1] = '';
+ $file[count($file)-1] = '';
chdir($dest_filename_dir . '/install/update/old');
foreach ($file as $entry)
@@ -196,9 +196,10 @@ if (sizeof($package->old_packages))
*/
$copy_relative_directories = array(
'config/' => array(
+ 'recursive' => true,
'copied' => false,
'copy' => array(
- 'config/*.yml' => 'config',
+ 'config/*' => 'config',
),
),
);
@@ -213,7 +214,7 @@ if (sizeof($package->old_packages))
// Create Directories along the way?
$file = explode('/', $file);
// Remove filename portion
- $file[sizeof($file)-1] = '';
+ $file[count($file)-1] = '';
chdir($dest_filename_dir . '/install/update/new');
foreach ($file as $entry)
@@ -256,7 +257,15 @@ if (sizeof($package->old_packages))
}
$source_dir_files = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $source_dir_files;
$destination_dir = $dest_filename_dir . '/install/update/new/' . $destination_dir;
- $package->run_command('cp ' . $source_dir_files . ' ' . $destination_dir);
+
+ if (isset($data['recursive']) && $data['recursive'])
+ {
+ $package->run_command('cp -Rp ' . $source_dir_files . ' ' . $destination_dir);
+ }
+ else
+ {
+ $package->run_command('cp ' . $source_dir_files . ' ' . $destination_dir);
+ }
}
$copy_relative_directories[$reference]['copied'] = true;
}
@@ -272,7 +281,7 @@ if (sizeof($package->old_packages))
'adm/style/admin.css' => 'adm/style',
'adm/style/admin.js' => 'adm/style',
'adm/style/ajax.js' => 'adm/style',
- 'adm/style/install_*' => 'adm/style',
+ 'adm/style/installer_*' => 'adm/style',
'assets/javascript/*' => 'assets/javascript',
);
@@ -312,7 +321,7 @@ $update_info = array(
\'version\' => array(\'from\' => \'' . str_replace('_to_', '', $package->old_packages[$_package_name]) . '\', \'to\' => \'' . $package->get('new_version_number') . '\'),
';
- if (sizeof($file_contents['all']))
+ if (count($file_contents['all']))
{
$index_contents .= "\t'files' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['all']) . "',\n\t),\n";
}
@@ -321,7 +330,7 @@ $update_info = array(
$index_contents .= "\t'files' => array(),\n";
}
- if (sizeof($file_contents['binary']))
+ if (count($file_contents['binary']))
{
$index_contents .= "\t'binary' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['binary']) . "',\n\t),\n";
}
@@ -330,7 +339,7 @@ $update_info = array(
$index_contents .= "\t'binary' => array(),\n";
}
- if (sizeof($file_contents['deleted']))
+ if (count($file_contents['deleted']))
{
$index_contents .= "\t'deleted' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['deleted']) . "',\n\t),\n";
}
@@ -371,7 +380,7 @@ $compress_programs = array(
'zip' => 'zip -r'
);
-if (sizeof($package->old_packages))
+if (count($package->old_packages))
{
// Build Patch Files
chdir($package->get('patch_directory'));
@@ -470,22 +479,14 @@ chdir($package->get('dest_dir') . '/install');
// $package->run_command('rm -v database_update.php');
$package->run_command('rm -v install_update.php');
-chdir($package->get('dest_dir'));
-$package->run_command('mv -v styles/subsilver2 ../subsilver2');
-$package->run_command('cp -p docs/COPYING ../subsilver2/license.txt');
-
chdir($package->locations['package_dir']);
foreach ($compress_programs as $extension => $compress_command)
{
$package->begin_status('Packaging phpBB for ' . $extension);
$package->run_command('rm -v ./release_files/' . $package->get('release_filename') . ".{$extension}");
- $package->run_command('rm -v ./release_files/subsilver2_' . $package->get('new_version_number') . ".{$extension}");
// Build Package
$package->run_command("$compress_command ./release_files/" . $package->get('release_filename') . '.' . $extension . ' ' . $package->get('package_name'));
-
- // Build subSilver2 Package
- $package->run_command("$compress_command ./release_files/subsilver2_" . $package->get('new_version_number') . '.' . $extension . ' subsilver2');
}
// Microsoft Web PI packaging