From 6177a277833f8fcd420c0996e1adc26ace8aff87 Mon Sep 17 00:00:00 2001 From: Johan Janssens Date: Sun, 31 May 2015 23:30:03 +0200 Subject: [PATCH] #113 - Cleanup build folder. Remove unused code. --- build/bootstrap/Makefile | 6 +- build/build.php | 210 ------------------------- build/indexmaker.php | 34 ---- build/update/extension.xml | 58 ------- build/update/jed/list.xml | 3 - build/update/list.xml | 4 - build/update/sts/extension_sts.xml | 94 ----------- build/update/sts/list_sts.xml | 3 - build/update/test/extension_test.xml | 40 ----- build/update/test/list_test.xml | 4 - build/update/teststs/extension_sts.xml | 94 ----------- build/update/teststs/list_sts.xml | 3 - 12 files changed, 3 insertions(+), 550 deletions(-) delete mode 100644 build/build.php delete mode 100644 build/indexmaker.php delete mode 100644 build/update/extension.xml delete mode 100644 build/update/jed/list.xml delete mode 100644 build/update/list.xml delete mode 100644 build/update/sts/extension_sts.xml delete mode 100644 build/update/sts/list_sts.xml delete mode 100644 build/update/test/extension_test.xml delete mode 100644 build/update/test/list_test.xml delete mode 100644 build/update/teststs/extension_sts.xml delete mode 100644 build/update/teststs/list_sts.xml diff --git a/build/bootstrap/Makefile b/build/bootstrap/Makefile index 8c435f5e6a..49a37d7191 100644 --- a/build/bootstrap/Makefile +++ b/build/bootstrap/Makefile @@ -1,6 +1,6 @@ # # This makefile builds Bootstrap customized for Joomla. -# +# # Step 1: make bootstrap-js # Step 2: make bootstrap-css # @@ -12,8 +12,8 @@ # https://github.com/joomla/joomla-cms/pull/1166 # -BOOTSTRAP_LESS = ../../media/jui/less/bootstrap.less -BOOTSTRAP_RESPONSIVE_LESS = ../../media/jui/less/responsive.less +BOOTSTRAP_LESS = ../../web/media/jui/less/bootstrap.less +BOOTSTRAP_RESPONSIVE_LESS = ../../web/media/jui/less/responsive.less DATE=$(shell date +%I:%M%p) CHECK=\033[32m✔\033[39m HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# diff --git a/build/build.php b/build/build.php deleted file mode 100644 index 358395c5b3..0000000000 --- a/build/build.php +++ /dev/null @@ -1,210 +0,0 @@ -RELEASE; -$release = $jversion->DEV_LEVEL; -$stability = $jversion->DEV_STATUS; -$fullVersion = $version . '.' . $release; - -// Shortcut the paths to the repository root and build folder -$repo = dirname(__DIR__); -$here = __DIR__; - -// Set paths for the build packages -$tmp = $here . '/tmp'; -$fullpath = $tmp . '/' . $fullVersion; - -echo "Start build for version $fullVersion.\n"; -echo "Delete old release folder.\n"; -system('rm -rf ' . $tmp); -mkdir($tmp); -mkdir($fullpath); - -echo "Copy the files from the git repository.\n"; -chdir($repo); -system($gitPath . ' archive ' . $fullVersion . ' | tar -x -C ' . $fullpath); - -chdir($tmp); -system('mkdir diffdocs'); -system('mkdir diffconvert'); -system('mkdir packages' . $version); - -echo "Copy manifest file to root directory for install packages.\n"; -system('cp ' . $fullpath . '/administrator/manifests/files/joomla.xml ' . $fullpath); - -echo "Create list of changed files from git repository.\n"; - -/* - * Here we force add every top-level directory and file in our diff archive, even if they haven't changed. - * This allows us to install these files from the Extension Manager. - * So we add the index file for each top-level directory. - * Note: If we add new top-level directories or files, be sure to include them here. - */ -$filesArray = array( - "administrator/index.php\n" => true, - "bin/index.html\n" => true, - "cache/index.html\n" => true, - "cli/index.html\n" => true, - "components/index.html\n" => true, - "images/index.html\n" => true, - "includes/index.html\n" => true, - "language/index.html\n" => true, - "layouts/index.html\n" => true, - "libraries/index.html\n" => true, - "logs/index.html\n" => true, - "media/index.html\n" => true, - "modules/index.html\n" => true, - "plugins/index.html\n" => true, - "templates/index.html\n" => true, - "tmp/index.html\n" => true, - "htaccess.txt\n" => true, - "index.php\n" => true, - "LICENSE.txt\n" => true, - "README.txt\n" => true, - "robots.txt.dist\n" => true, - "web.config.txt\n" => true, - "joomla.xml\n" => true -); - -// For the packages, replace spaces in stability (RC) with underscores -$packageStability = str_replace(' ', '_', $stability); - -// Count down starting with the latest release and add diff files to this array -for ($num = $release - 1; $num >= 0; $num--) -{ - echo "Create version $num update packages.\n"; - - // Here we get a list of all files that have changed between the two tags ($previousTag and $fullVersion) and save in diffdocs - $previousTag = $version . '.' . $num; - $command = $gitPath . ' diff tags/' . $previousTag . ' tags/' . $fullVersion . ' --name-status > diffdocs/' . $version . '.' . $num; - - system($command); - - // $filesArray will hold the array of files to include in diff package - $deletedFiles = array(); - $files = file('diffdocs/' . $version . '.' . $num); - - // Loop through and add all files except: tests, installation, build, .git, .travis, travis, phpunit, .md, or images - foreach ($files as $file) - { - if (substr($file, 2, 5) != 'tests' && substr($file, 2, 12) != 'installation' && substr($file, 2, 5) != 'build' && substr($file, 2, 4) != '.git' - && substr($file, 2, 7) != '.travis' && substr($file, 2, 6) != 'travis' && substr($file, 2, 7) != 'phpunit' && substr($file, -3) != '.md' - && substr($file, 2, 6) != 'images') - { - // Don't add deleted files to the list - if (substr($file, 0, 1) != 'D') - { - $filesArray[substr($file, 2)] = true; - } - else - { - // Add deleted files to the deleted files list - $deletedFiles[] = substr($file, 2); - } - } - } - - // Write the file list to a text file. - $filePut = array_keys($filesArray); - sort($filePut); - file_put_contents('diffconvert/' . $version . '.' . $num, implode('', $filePut)); - file_put_contents('diffconvert/' . $version . '.' . $num . '-deleted', $deletedFiles); - - // Only create archives for 0 and most recent versions. Skip other update versions. - if ($num != 0 && ($num != $release - 1)) - { - echo "Skipping patch archive for version $version.$num\n"; - - continue; - } - - $fromName = $num == 0 ? 'x' : $num; - // Create the diff archive packages using the file name list. - system('tar --create --bzip2 --no-recursion --directory ' . $fullVersion . ' --file packages' . $version . '/Joomla_' . $version . '.' . $fromName . '_to_' . $fullVersion . '-' . $packageStability . '-Patch_Package.tar.bz2 --files-from diffconvert/' . $version . '.' . $num . '> /dev/null'); - system('tar --create --gzip --no-recursion --directory ' . $fullVersion . ' --file packages' . $version . '/Joomla_' . $version . '.' . $fromName . '_to_' . $fullVersion . '-' . $packageStability . '-Patch_Package.tar.gz --files-from diffconvert/' . $version . '.' . $num . '> /dev/null'); - - chdir($fullVersion); - system('zip ../packages' . $version . '/Joomla_' . $version . '.' . $fromName . '_to_' . $fullVersion . '-' . $packageStability . '-Patch_Package.zip -@ < ../diffconvert/' . $version . '.' . $num . '> /dev/null'); - chdir('..'); -} - -// Delete the files and folders we exclude from the packages (tests, docs, build, etc.). -echo "Delete folders not included in packages.\n"; -$doNotPackage = array('tests', '.gitignore', '.travis.yml', 'build', 'build.xml', 'phpunit.xml.dist', 'travisci-phpunit.xml', 'README.md', 'CONTRIBUTING.md'); -foreach ($doNotPackage as $removeFile) -{ - system('rm -rf ' . $fullVersion . '/' . $removeFile); -} - -// Recreate empty directories before creating new archives. -system('mkdir packages_full' . $fullVersion); -echo "Build full package files.\n"; -chdir($fullVersion); - -// Create full archive packages. -system('tar --create --bzip2 --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Full_Package.tar.bz2 * > /dev/null'); - -system('tar --create --gzip --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Full_Package.tar.gz * > /dev/null'); - -system('zip -r ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Full_Package.zip * > /dev/null'); - -// Create full update file without installation folder or sample images. -echo "Build full update package.\n"; -system('rm -r installation'); -system('rm -r images/headers'); -system('rm -r images/sampledata'); -system('rm images/joomla_black.gif'); -system('rm images/joomla_green.gif'); -system('rm images/joomla_logo_black.jpg'); -system('rm images/powered_by.png'); - -system('tar --create --bzip2 --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Update_Package.tar.bz2 * > /dev/null'); - -system('tar --create --gzip --file ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Update_Package.tar.gz * > /dev/null'); - -system('zip -r ../packages_full' . $fullVersion . '/Joomla_' . $fullVersion . '-' . $packageStability . '-Update_Package.zip * > /dev/null'); - -echo "Build of version $fullVersion complete!\n"; diff --git a/build/indexmaker.php b/build/indexmaker.php deleted file mode 100644 index e8a356a2e5..0000000000 --- a/build/indexmaker.php +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/php - $dir) - { - if (!$dir->isDir()) - { - continue; - } - - // Add an index.html if neither an index.html nor an index.php exist - if (!(file_exists($path . '/index.html') || file_exists($path . '/index.php'))) - { - file_put_contents($path . '/index.html', '' . "\n"); - } - } -} - -$work = $_SERVER['argv'][1]; - -echo "Working on directory " . $work . "\n"; - -getDirectory($_SERVER['argv'][1]); diff --git a/build/update/extension.xml b/build/update/extension.xml deleted file mode 100644 index 0d6a8e2bbf..0000000000 --- a/build/update/extension.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - Joomla! 1.7 - Joomla! 1.7 CMS - joomla - file - 1.7.0 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/15901/68959/Joomla_1.6.x_to_1.7.0_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
Testing
- -
- - Joomla! 2.5 - Joomla! 2.5 CMS - joomla - file - 2.5.9 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17967/78437/Joomla_2.5.9-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
Testing
- -
- - Joomla! 2.5 - Joomla! 2.5 CMS - joomla - file - 2.5.9 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17967/78436/Joomla_2.5.x_to_2.5.9-Stable-Patch_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
Testing
- -
-
- diff --git a/build/update/jed/list.xml b/build/update/jed/list.xml deleted file mode 100644 index 69b659f9fa..0000000000 --- a/build/update/jed/list.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/build/update/list.xml b/build/update/list.xml deleted file mode 100644 index 4212356ed7..0000000000 --- a/build/update/list.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/build/update/sts/extension_sts.xml b/build/update/sts/extension_sts.xml deleted file mode 100644 index c70b3ca788..0000000000 --- a/build/update/sts/extension_sts.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - Joomla! 1.7 - Joomla! 1.7 CMS - joomla - file - 1.7.0 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/15901/68959/Joomla_1.6.x_to_1.7.0_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 2.5 - Joomla! 2.5 CMS - joomla - file - 2.5.8 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17716/77259/Joomla_2.5.8-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 3.0 - Joomla! 3.0 CMS - joomla - file - 3.0.1 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17709/77244/Joomla_3.0.2-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 3.0 - Joomla! 3.0 CMS - joomla - file - 3.0.2 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17709/77244/Joomla_3.0.2-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 3.0 - Joomla! 3.0 CMS - joomla - file - 3.0.2 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17709/77243/Joomla_3.0.1_to_3.0.2-Stable-Patch_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
-
- diff --git a/build/update/sts/list_sts.xml b/build/update/sts/list_sts.xml deleted file mode 100644 index d494f2077f..0000000000 --- a/build/update/sts/list_sts.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/build/update/test/extension_test.xml b/build/update/test/extension_test.xml deleted file mode 100644 index f67d41c194..0000000000 --- a/build/update/test/extension_test.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - Joomla! 2.5 - Joomla! 2.5 CMS - joomla - file - 2.5.9 - http://www.joomla.org/ - - http://update.joomla.org/core/test/Joomla_2.5.9-Stable-Full_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
Testing
- -
- - Joomla! 2.5 - Joomla! 2.5 CMS - joomla - file - 2.5.9 - http://www.joomla.org/ - - http://update.joomla.org/core/test/Joomla_2.5.x_to_2.5.9-Stable-Patch_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
Testing
- -
-
- diff --git a/build/update/test/list_test.xml b/build/update/test/list_test.xml deleted file mode 100644 index 3976305d67..0000000000 --- a/build/update/test/list_test.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/build/update/teststs/extension_sts.xml b/build/update/teststs/extension_sts.xml deleted file mode 100644 index 545d61a189..0000000000 --- a/build/update/teststs/extension_sts.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - Joomla! 1.7 - Joomla! 1.7 CMS - joomla - file - 1.7.0 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/15901/68959/Joomla_1.6.x_to_1.7.0_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 2.5 - Joomla! 2.5 CMS - joomla - file - 2.5.8 - http://www.joomla.org/ - - http://joomlacode.org/gf/download/frsrelease/17716/77259/Joomla_2.5.8-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 3.0 - Joomla! 3.0 CMS - joomla - file - 3.0.3 - http://www.joomla.org/ - - http://update.joomla.org/core/teststs/Joomla_3.0.3-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 3.0 - Joomla! 3.0 CMS - joomla - file - 3.0.3 - http://www.joomla.org/ - - http://update.joomla.org/core/teststs/Joomla_3.0.3-Stable-Update_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
- - Joomla! 3.0 - Joomla! 3.0 CMS - joomla - file - 3.0.3 - http://www.joomla.org/ - - http://update.joomla.org/core/teststs/Joomla_3.0.x_to_3.0.3-Stable-Patch_Package.zip - - - stable - - Sam Moffatt - http://sammoffatt.com.au -
STS
- -
-
- diff --git a/build/update/teststs/list_sts.xml b/build/update/teststs/list_sts.xml deleted file mode 100644 index dac42767cf..0000000000 --- a/build/update/teststs/list_sts.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file