@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | 'deploy:prepare', |
8 | 8 | 'deploy:lock', |
9 | 9 | 'deploy:release', |
10 | - 'phpdraft:upload_files', |
|
11 | - 'phpdraft:remote_yarn', |
|
10 | + 'phpdraft:upload_files', |
|
11 | + 'phpdraft:remote_yarn', |
|
12 | 12 | 'phpdraft:remote_composer', |
13 | 13 | 'phpdraft:breakpoint', |
14 | 14 | 'phpdraft:migrate', |
15 | - 'deploy:symlink', |
|
16 | - //'phpdraft:restart_fpm', |
|
15 | + 'deploy:symlink', |
|
16 | + //'phpdraft:restart_fpm', |
|
17 | 17 | 'deploy:unlock', |
18 | 18 | 'cleanup', |
19 | 19 | 'success' |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | $settings_location = ask("What is the absolute (local) path of where your settings files are located?", |
33 | 33 | "~/phpdraft_settings"); |
34 | 34 | |
35 | - runLocally("cp $settings_location/.htaccess .htaccess"); |
|
35 | + runLocally("cp $settings_location/.htaccess .htaccess"); |
|
36 | 36 | runLocally("cp $settings_location/appsettings.php appsettings.php"); |
37 | - runLocally("cp $settings_location/config.js js/config.js"); |
|
37 | + runLocally("cp $settings_location/config.js js/config.js"); |
|
38 | 38 | runLocally("cp $settings_location/deploy.php deploy.php"); |
39 | - runLocally("cp $settings_location/index.html index.html"); |
|
40 | - runLocally("cp $settings_location/phinx.yml phinx.yml"); |
|
41 | - runLocally("cp $settings_location/web.config web.config"); |
|
39 | + runLocally("cp $settings_location/index.html index.html"); |
|
40 | + runLocally("cp $settings_location/phinx.yml phinx.yml"); |
|
41 | + runLocally("cp $settings_location/web.config web.config"); |
|
42 | 42 | |
43 | 43 | writeln("\n\n<info>Success! I imported those settings for you, you should be ready to deploy now.</info>\n"); |
44 | 44 | }); |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | 'db', |
76 | 76 | 'fonts', |
77 | 77 | 'images', |
78 | - 'js', |
|
78 | + 'js', |
|
79 | 79 | '.htaccess', |
80 | 80 | 'appsettings.php', |
81 | 81 | 'composer.json', |
82 | - 'composer.lock', |
|
83 | - 'package.json', |
|
82 | + 'composer.lock', |
|
83 | + 'package.json', |
|
84 | 84 | 'phinx.yml', |
85 | 85 | 'deploy', |
86 | 86 | 'index.html', |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | desc('Install NPM dependencies remotely'); |
97 | 97 | task('phpdraft:remote_yarn', function() { |
98 | - cd('{{release_path}}'); |
|
98 | + cd('{{release_path}}'); |
|
99 | 99 | |
100 | 100 | run('yarn --production'); |
101 | 101 | |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | |
144 | 144 | desc('Run Phinx migrations'); |
145 | 145 | task('phpdraft:migrate', function() { |
146 | - cd('{{release_path}}'); |
|
146 | + cd('{{release_path}}'); |
|
147 | 147 | |
148 | - set('phpdraft_rollback_required', true); |
|
148 | + set('phpdraft_rollback_required', true); |
|
149 | 149 | |
150 | 150 | run('php deploy/phinx.phar migrate -e production'); |
151 | 151 | |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | task('phpdraft:rollback', function() { |
157 | 157 | writeln('<comment>Rolling back database migrations...</comment>'); |
158 | 158 | if(get("phpdraft_rollback_required") == true) { |
159 | - cd('{{release_path}}'); |
|
160 | - run('php deploy/phinx.phar rollback -e production'); |
|
161 | - cd('{{deploy_path}}'); |
|
159 | + cd('{{release_path}}'); |
|
160 | + run('php deploy/phinx.phar rollback -e production'); |
|
161 | + cd('{{deploy_path}}'); |
|
162 | 162 | } |
163 | 163 | })->setPrivate(); |
164 | 164 |
@@ -13,12 +13,12 @@ discard block |
||
13 | 13 | |
14 | 14 | desc('PHP Draft: Offer to backup current settings for future upgrade imports'); |
15 | 15 | task('backup', function() { |
16 | - if (file_exists("js/config.js") == false) { |
|
17 | - writeln("<error>Looks like js/config.js doesn't exist - I can't back up your settings.</error>\n"); |
|
18 | - writeln("<comment>Ensure you have downloaded a compiled release from https://github.com/mattheworres/phpdraft/releases</comment>\n"); |
|
19 | - writeln("<comment>Or, if you are building from sourcecode, consult the wiki on how to properly prepare a release.</comment>\n"); |
|
20 | - throw new \Exception("PHP Draft is not in a exportable state (use downloads from Releases on Github)"); |
|
21 | - } |
|
16 | + if (file_exists("js/config.js") == false) { |
|
17 | + writeln("<error>Looks like js/config.js doesn't exist - I can't back up your settings.</error>\n"); |
|
18 | + writeln("<comment>Ensure you have downloaded a compiled release from https://github.com/mattheworres/phpdraft/releases</comment>\n"); |
|
19 | + writeln("<comment>Or, if you are building from sourcecode, consult the wiki on how to properly prepare a release.</comment>\n"); |
|
20 | + throw new \Exception("PHP Draft is not in a exportable state (use downloads from Releases on Github)"); |
|
21 | + } |
|
22 | 22 | |
23 | 23 | writeln("\n\n<info>Looking great! Hey, if you want I can back up these snazzy settings files " |
24 | 24 | ."I just created for you. This will make it WAY easier to update PHP Draft in the future!</info>\n"); |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | runLocally("cp js/config.js $backup_location/config.js"); |
36 | 36 | runLocally("cp phinx.yml $backup_location/phinx.yml"); |
37 | 37 | runLocally("cp deploy.php $backup_location/deploy.php"); |
38 | - runLocally("cp .htaccess $backup_location/.htaccess"); |
|
39 | - runLocally("cp index.html $backup_location/index.html"); |
|
38 | + runLocally("cp .htaccess $backup_location/.htaccess"); |
|
39 | + runLocally("cp index.html $backup_location/index.html"); |
|
40 | 40 | runLocally("cp web.config $backup_location/web.config"); |
41 | 41 | } |
42 | 42 | }); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $items_required_for_packaging = [ |
19 | 19 | 'app', |
20 | 20 | 'db', |
21 | - 'deploy', |
|
21 | + 'deploy', |
|
22 | 22 | 'gulp' |
23 | 23 | ]; |
24 | 24 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'db', |
96 | 96 | 'deploy', |
97 | 97 | 'fonts', |
98 | - 'images', |
|
98 | + 'images', |
|
99 | 99 | 'vendor', |
100 | 100 | 'js' |
101 | 101 | ]; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | 'composer.json', |
106 | 106 | 'composer.lock', |
107 | 107 | 'README.MD', |
108 | - 'package.json', |
|
108 | + 'package.json', |
|
109 | 109 | 'index.html', |
110 | 110 | 'web.config' |
111 | 111 | ]; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $archivePath = get('phpdraft')['releasePath']; |
115 | 115 | |
116 | 116 | foreach($phpdraft_release_dirs as $archiveDirectory) { |
117 | - runLocally("7z a $archivePath/$releaseFileName $archiveDirectory"); |
|
117 | + runLocally("7z a $archivePath/$releaseFileName $archiveDirectory"); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | foreach($phpdraft_release_files as $archiveFile) { |
@@ -122,16 +122,16 @@ discard block |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | //Hard-coded so we copy a working deploy.php so no one technically needs to edit a single file |
125 | - runLocally("7z a $archivePath/$releaseFileName deploy/deploy.php.release"); |
|
126 | - runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci"); |
|
127 | - runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci"); |
|
128 | - runLocally("7z rn $archivePath/$releaseFileName deploy/deploy.php.release deploy.php"); |
|
129 | - runLocally("7z rn $archivePath/$releaseFileName deploy/appsettings.php.ci appsettings.php"); |
|
130 | - runLocally("7z rn $archivePath/$releaseFileName deploy/phinx.yml.ci phinx.yml"); |
|
131 | - |
|
132 | - //Re-include them in case anyone using this packaged release needs CI versions of these! |
|
133 | - runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci"); |
|
134 | - runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci"); |
|
125 | + runLocally("7z a $archivePath/$releaseFileName deploy/deploy.php.release"); |
|
126 | + runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci"); |
|
127 | + runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci"); |
|
128 | + runLocally("7z rn $archivePath/$releaseFileName deploy/deploy.php.release deploy.php"); |
|
129 | + runLocally("7z rn $archivePath/$releaseFileName deploy/appsettings.php.ci appsettings.php"); |
|
130 | + runLocally("7z rn $archivePath/$releaseFileName deploy/phinx.yml.ci phinx.yml"); |
|
131 | + |
|
132 | + //Re-include them in case anyone using this packaged release needs CI versions of these! |
|
133 | + runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci"); |
|
134 | + runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci"); |
|
135 | 135 | })->setPrivate(); |
136 | 136 | |
137 | 137 | desc('Package resources with 7zip'); |