From 96e56a824695699061872bd57eac646fd935adad Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 19 Nov 2012 23:33:24 +0100 Subject: [PATCH] API Removed 'new-project' command Use 'compass create-project silverstripe-installer' instead --- tools/_manifest_exclude | 0 tools/lib/new-project.php | 100 -------------------------------------- tools/lib/template.php | 26 ---------- tools/new-project | 3 -- tools/new-project.bat | 2 - tools/versions.php | 4 -- 6 files changed, 135 deletions(-) delete mode 100644 tools/_manifest_exclude delete mode 100644 tools/lib/new-project.php delete mode 100644 tools/lib/template.php delete mode 100755 tools/new-project delete mode 100644 tools/new-project.bat delete mode 100644 tools/versions.php diff --git a/tools/_manifest_exclude b/tools/_manifest_exclude deleted file mode 100644 index e69de29..0000000 diff --git a/tools/lib/new-project.php b/tools/lib/new-project.php deleted file mode 100644 index f4ce832..0000000 --- a/tools/lib/new-project.php +++ /dev/null @@ -1,100 +0,0 @@ - $source) { - if ($mode == 'flat') $errors = array_merge($errors, (array)$source->canExport()); - elseif ($mode == 'piston') $errors = array_merge($errors, (array)$source->canPiston()); - elseif ($mode == 'contribute') $errors = array_merge($errors, (array)$source->canCheckout()); - } - - $errors = array_unique($errors); - if ($errors) { - echo "\nRequirements were not met for mode $mode:\n "; - echo implode("\n ", $errors); - echo "\n\nEither correct the requirements or try a different mode\n\n"; - $mode = null; - } -} - -if (($mode != 'piston' && $mode != 'flat' && $mode != 'contribute') || !$templatefile || isset($opts['h']) || isset($opts['help'])) { - echo "Usage: new-project [-m | --mode piston | flat | contribute] [-t | --template template.php] [-h | --help]\n"; - echo "\n"; - echo " piston is the default mode, and uses the piston tool to add the core modules\n"; - echo " It allows pulling down core module updates later while maintaining your changes.\n"; - echo " It does not provide any tools for contributing your changes back upstream, though a third-party tool for git is available\n"; - echo " It requires the external piston tool and all it's dependancies to be installed.\n"; - echo " It only works on svn and git managed repositories.\n"; - echo "\n"; - echo " flat copies the core module code without using any tools or version control\n"; - echo " It does not provide any tools for pulling down core modules updates later, or contributing changes back upstream\n"; - echo " It requires only php with the zip and curl extensions\n"; - echo " It works regardless of version control system\n"; - echo "\n"; - echo " contribute sets up the core as separate modules, allowing you to contribute any changes back upstream\n"; - echo " It allows pulling down core module updates later while maintaining your changes.\n"; - echo " It allows contributing your changes back upstream\n"; - echo " It requires git and all it's dependancies to be installed.\n"; - echo " It only works on git managed repositories.\n"; - die; -} - -// Check we're not being re-called before we do anything -$alreadyexists = false; -foreach ($template as $dest => $source) { - if (file_exists($dest)) { - echo "ERROR: Module $dest already exists. This script can not be called multiple times, or upgrade existing modules.\n"; - $alreadyexists = true; - } -} -if ($alreadyexists) die; - -if ($mode == 'piston') { - echo "Now running piston to add modules. Piston is quite noisy, and can sometimes list errors as fatal that can be ignored.\n"; - echo "If errors are shown, please check result before assuming failure\n\n"; -} - -foreach ($template as $dest => $source) { - if ($mode == 'contribute') { - GIT::ignore($dest); - $source->checkout($dest); - } - else if ($mode == 'piston') $source->piston($dest); - else $source->export($dest); -} - -if ($mode == 'piston' && GIT::isGITRepo()) { - echo "\n\nNow commit the changes with something like \"git commit -m 'Import core SilverStripe modules'\"\n"; -} - diff --git a/tools/lib/template.php b/tools/lib/template.php deleted file mode 100644 index c184f43..0000000 --- a/tools/lib/template.php +++ /dev/null @@ -1,26 +0,0 @@ - new Github(array( - 'user' => 'silverstripe', - 'project' => 'sapphire', - 'branch' => FRAMEWORK_CURRENT_BRANCH - )), - 'cms' => new Github(array( - 'user' => 'silverstripe', - 'project' => 'silverstripe-cms', - 'branch' => FRAMEWORK_CURRENT_BRANCH - )), - 'themes/simple' => new GithubSparse(array( - 'user' => 'silverstripe-themes', - 'project' => 'silverstripe-simple', - 'branch' => FRAMEWORK_CURRENT_BRANCH, - 'subdir' => '' - )) -); - diff --git a/tools/new-project b/tools/new-project deleted file mode 100755 index 99f8cd2..0000000 --- a/tools/new-project +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -base=`dirname $0` -php $base/lib/new-project.php "$@" \ No newline at end of file diff --git a/tools/new-project.bat b/tools/new-project.bat deleted file mode 100644 index b705a18..0000000 --- a/tools/new-project.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -php %~dp0\lib\new-project.php %* \ No newline at end of file diff --git a/tools/versions.php b/tools/versions.php deleted file mode 100644 index f8b75fa..0000000 --- a/tools/versions.php +++ /dev/null @@ -1,4 +0,0 @@ -