|
125 | 125 | } |
126 | 126 | } |
127 | 127 |
|
| 128 | + //create compiled, log, public/upload, config/schema |
| 129 | + if(!$request->hasStage('skip-mkdir')) { |
| 130 | + if (!is_dir($cwd . '/compiled')) { |
| 131 | + CommandLine::system('Making ' . $cwd . '/compiled'); |
| 132 | + mkdir($cwd . '/compiled', 0777); |
| 133 | + } |
| 134 | + |
| 135 | + if (!is_dir($cwd . '/log')) { |
| 136 | + CommandLine::system('Making ' . $cwd . '/log'); |
| 137 | + mkdir($cwd . '/log', 0777); |
| 138 | + } |
| 139 | + |
| 140 | + if (!is_dir($cwd . '/public/upload')) { |
| 141 | + CommandLine::system('Making ' . $cwd . '/public/upload'); |
| 142 | + mkdir($cwd . '/public/upload', 0777); |
| 143 | + } |
| 144 | + |
| 145 | + if (!is_dir($cwd . '/config/schema')) { |
| 146 | + CommandLine::system('Making ' . $cwd . '/config/schema'); |
| 147 | + mkdir($cwd . '/config/schema', 0777); |
| 148 | + } |
| 149 | + } |
| 150 | + |
| 151 | + //chmod compiled, log, config, public/upload |
| 152 | + if(!$request->hasStage('skip-chmod')) { |
| 153 | + if (is_dir($cwd . '/compiled')) { |
| 154 | + CommandLine::system('chmoding ' . $cwd . '/compiled'); |
| 155 | + chmod($cwd . '/compiled', 0777); |
| 156 | + } |
| 157 | + |
| 158 | + if (is_dir($cwd . '/log')) { |
| 159 | + CommandLine::system('chmoding ' . $cwd . '/log'); |
| 160 | + chmod($cwd . '/log', 0777); |
| 161 | + } |
| 162 | + |
| 163 | + if (is_dir($cwd . '/config')) { |
| 164 | + CommandLine::system('chmoding ' . $cwd . '/config'); |
| 165 | + chmod($cwd . '/config', 0777); |
| 166 | + } |
| 167 | + |
| 168 | + if (is_dir($cwd . '/public/upload')) { |
| 169 | + CommandLine::system('chmoding ' . $cwd . '/public/upload'); |
| 170 | + chmod($cwd . '/public/upload', 0777); |
| 171 | + } |
| 172 | + } |
| 173 | + |
128 | 174 | if(!$request->hasStage('skip-sql')) { |
129 | 175 | //SQL |
130 | 176 | CommandLine::system('Setting up SQL...'); |
|
189 | 235 | CommandLine::info('Recommended actions:'); |
190 | 236 | CommandLine::info(' - bin/cradle sql populate'); |
191 | 237 | CommandLine::info(' - yarn build'); |
192 | | - CommandLine::info(' - chmod -R 777 config/admin'); |
193 | | - CommandLine::info(' - chmod -R 777 config/i18n'); |
194 | 238 | }; |
0 commit comments