File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1414add ('writable_dirs ' , []);
1515set ('allow_anonymous_stats ' , false );
1616
17- set ('bin/console ' , function () {
18- return parse ('php {{release_path}}/bin/console --no-interaction ' );
19- });
20-
2117// Hosts
2218host (getenv ('DEPLOY_HOST ' ))
2319 ->stage ('production ' )
2420 ->user (getenv ('DEPLOY_USER ' ))
2521 ->identityFile ('.travis/deploy.key ' )
26- ->set ('deploy_path ' , ' ~/php.of.by/builds/ ' );
22+ ->set ('deploy_path ' , getenv ( ' DEPLOY_PATH ' ) );
2723
2824task ('deploy:package_upload ' , function (){
2925 // Upload code package to server
3733 run (sprintf ('/bin/mv %s/package.tgz %s ' , $ deployPath , get ('release_path ' )));
3834})->desc ('Extract package ' );
3935
36+
37+ task ('deploy:change_prod_files ' , function () {
38+ run ("cd {{deploy_path}} && rm -Rf current && mv {{release_path}} current " );
39+ run ("cd {{deploy_path}} && rm release " );
40+ })->desc ('Creating symlink to release ' );;
41+
4042// Tasks
4143
4244desc ('Deploy project ' );
5254// 'deploy:vendors',
5355// 'deploy:cache:clear',
5456// 'deploy:cache:warmup',
55- 'deploy:symlink ' ,
57+ 'deploy:change_prod_files ' ,
5658 'deploy:unlock ' ,
5759 'cleanup ' ,
5860]);
You can’t perform that action at this time.
0 commit comments