Skip to content

Commit cceca1e

Browse files
committed
Fix deployment
1 parent 020fbe6 commit cceca1e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

deploy.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414
add('writable_dirs', []);
1515
set('allow_anonymous_stats', false);
1616

17-
set('bin/console', function () {
18-
return parse('php {{release_path}}/bin/console --no-interaction');
19-
});
20-
2117
// Hosts
2218
host(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

2824
task('deploy:package_upload', function(){
2925
// Upload code package to server
@@ -37,6 +33,12 @@
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

4244
desc('Deploy project');
@@ -52,7 +54,7 @@
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
]);

0 commit comments

Comments
 (0)