Skip to content
Snippets Groups Projects
Commit c3ba674a authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #750 from greezybacon/feature/deploy-setup


Allow deployment of setup/

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents cd9e4e0c e24750fe
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,10 @@ class Deployment extends Unpacker { ...@@ -16,6 +16,10 @@ class Deployment extends Unpacker {
'action'=>'store_true', 'action'=>'store_true',
'help'=>'Don\'t actually deploy new code. Just show the files 'help'=>'Don\'t actually deploy new code. Just show the files
that would be copied'); 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); # super(*args);
call_user_func_array(array('parent', '__construct'), func_get_args()); call_user_func_array(array('parent', '__construct'), func_get_args());
} }
...@@ -52,10 +56,14 @@ class Deployment extends Unpacker { ...@@ -52,10 +56,14 @@ class Deployment extends Unpacker {
# Locate the upload folder # Locate the upload folder
$root = $this->find_root_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 # Unpack everything but the include/ folder
$this->unpackage("$root/{,.}*", $this->destination, -1, $this->unpackage("$root/{,.}*", $this->destination, -1,
array("$root/setup", "$root/include", "$root/.git*", $exclusions);
"*.sw[a-z]","*.md", "*.txt"));
# Unpack the include folder # Unpack the include folder
$this->unpackage("$root/include/{,.}*", $include, -1, $this->unpackage("$root/include/{,.}*", $include, -1,
array("*/include/ost-config.php")); array("*/include/ost-config.php"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment