-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRoboFile.php
71 lines (60 loc) · 2.41 KB
/
RoboFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
use Globalis\WP\Cubi\Robo\BuildTrait;
use Globalis\WP\Cubi\Robo\DeployTrait;
use Globalis\WP\Cubi\Robo\GitTrait;
use Globalis\WP\Cubi\Robo\InstallTrait;
use Globalis\WP\Cubi\Robo\WordPressTrait;
class RoboFile extends \Globalis\WP\Cubi\Robo\RoboFile
{
use BuildTrait;
use DeployTrait;
use GitTrait;
use InstallTrait;
use WordPressTrait {
wpUrl as wpUrlInherited;
}
const ROOT = __DIR__;
const PATH_DIRECTORY_CONFIG = 'config';
const PATH_DIRECTORY_WEB = 'web';
const PATH_DIRECTORY_MEDIA = 'web/media';
const PATH_DIRECTORY_LOG = 'log';
const PATH_FILE_WP_CLI_EXECUTABLE = __DIR__ . '/vendor/bin/wp';
const PATH_FILE_PROPERTIES = __DIR__ . '/.robo/properties.php';
const PATH_FILE_PROPERTIES_REMOTE = __DIR__ . '/.robo/properties.remote.php';
const PATH_FILE_CONFIG_VARS = 'config/vars.php';
const PATH_FILE_CONFIG_VARS_REMOTE = 'config/vars.%s.php';
const PATH_FILE_CONFIG_APPLICATION = 'config/application.php';
const PATH_FILE_CONFIG_LOCAL = 'config/local.php';
const PATH_FILE_CONFIG_LOCAL_SAMPLE = 'config/local.sample.php';
const PATH_FILE_CONFIG_SALT_KEYS = 'config/salt-keys.php';
const PATH_FILES_BUILD_ASSETS = [];
const HTACCESS_BUILD = 'web/.htaccess';
const HTACCESS_CONFIG_DIRECTORY = 'config/htaccess';
const HTACCESS_PARTS = [
'htaccess-general',
'htaccess-seo',
'htaccess-performances',
'htaccess-redirect',
'htaccess-security',
'htaccess-urls',
'htaccess-wp-permalinks',
];
const PATH_VENDORS = [
'/vendor',
'/web/wpcb',
'/web/app/modules',
];
const CONFIRM_CONFIG_BEFORE_DEPLOY = true;
protected function wpUrl()
{
$scheme = $this->getConfig('development', 'WEB_SCHEME');
$domain = $this->getConfig('development', 'WEB_DOMAIN');
$path = $this->getConfig('development', 'WEB_PATH');
return $scheme . '://' . $domain . $path . '/wpcb';
}
// public function buildAssets($environment = 'development', $root = \RoboFile::ROOT)
// {
// // Write your own function, according to your assets build process
// // Don't forget to update PATH_FILES_BUILD_ASSETS class constant, or the deploy option `--ignore-assets` won't work
// }
}