@@ -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 | }); |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | |
132 | 132 | desc('Copy files from the deploy directory to their place.'); |
133 | 133 | task('phpdraft:copyfiles', function() { |
134 | - if(file_exists('js') !== true) { |
|
135 | - runLocally('mkdir js'); |
|
136 | - } |
|
134 | + if(file_exists('js') !== true) { |
|
135 | + runLocally('mkdir js'); |
|
136 | + } |
|
137 | 137 | |
138 | 138 | runLocally('cp deploy/config.js.ci js/config.js'); |
139 | 139 | runLocally('cp deploy/appsettings.php.ci appsettings.php'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | ."I just created for you. This will make it WAY easier to update PHP Draft in the future!</info>\n"); |
25 | 25 | $answer = askConfirmation("Should I back up your settings for you?", false); |
26 | 26 | |
27 | - if($answer == true) { |
|
27 | + if ($answer == true) { |
|
28 | 28 | writeln("\n\n<info>Awesome! Wherever you tell me to back your settings up to, you should make sure " |
29 | 29 | ."that only your user has permissions to view the file (if the server you're installing on " |
30 | 30 | ."is more important, you should probably ensure your disk is encrypted, too).</info>\n"); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $answer = askConfirmation($message, false); |
50 | 50 | |
51 | - if($answer == false) { |
|
51 | + if ($answer == false) { |
|
52 | 52 | throw new \Exception("Quitting setup at the user's request. BYE FELICIA."); |
53 | 53 | } |
54 | 54 | })->setPrivate(); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | desc('Copy files from the deploy directory to their place.'); |
133 | 133 | task('phpdraft:copyfiles', function() { |
134 | - if(file_exists('js') !== true) { |
|
134 | + if (file_exists('js') !== true) { |
|
135 | 135 | runLocally('mkdir js'); |
136 | 136 | } |
137 | 137 | |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | 'deploy.php' |
151 | 151 | ]; |
152 | 152 | |
153 | - foreach(get('phpdraft_setup_variables') as $property => $value) { |
|
154 | - foreach($files_to_replace_in as $file) { |
|
153 | + foreach (get('phpdraft_setup_variables') as $property => $value) { |
|
154 | + foreach ($files_to_replace_in as $file) { |
|
155 | 155 | //TODO: Is there something more platform agnostic we can use? |
156 | 156 | runLocally("sed -i '' 's|{phpdraft.$property}|$value|g' $file $file"); |
157 | 157 | } |