From e24750fe77a04b68f7aa4d37741157da7a07e41c Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 30 Sep 2013 08:53:13 -0500 Subject: [PATCH] Allow deployment of setup/ Useful for initial installs, where deployment of the `setup/` folder is required for the initial install. Thereafter, deployment can be run without the setup option so that the rest of the codebase can be maintained (already supported) --- setup/cli/modules/deploy.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup/cli/modules/deploy.php b/setup/cli/modules/deploy.php index 4d4868992..77798797b 100644 --- a/setup/cli/modules/deploy.php +++ b/setup/cli/modules/deploy.php @@ -16,6 +16,10 @@ class Deployment extends Unpacker { 'action'=>'store_true', 'help'=>'Don\'t actually deploy new code. Just show the files that would be copied'); + $this->options['setup'] = array('-s','--setup', + 'action'=>'store_true', + 'help'=>'Deploy the setup folder. Useful for deploying for new + installations.'); # super(*args); call_user_func_array(array('parent', '__construct'), func_get_args()); } @@ -52,10 +56,14 @@ class Deployment extends Unpacker { # Locate the upload folder $root = $this->find_root_folder(); + $exclusions = array("$root/include", "$root/.git*", + "*.sw[a-z]","*.md", "*.txt"); + if (!$options['setup']) + $exclusions[] = "$root/setup"; + # Unpack everything but the include/ folder $this->unpackage("$root/{,.}*", $this->destination, -1, - array("$root/setup", "$root/include", "$root/.git*", - "*.sw[a-z]","*.md", "*.txt")); + $exclusions); # Unpack the include folder $this->unpackage("$root/include/{,.}*", $include, -1, array("*/include/ost-config.php")); -- GitLab