mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Merge pull request #249 from pbudzon/master
Added simple check if the shell on remote server is POSIX-compliant.
This commit is contained in:
commit
0fe81e9eb1
@ -54,6 +54,15 @@ task('rollback', function () {
|
|||||||
* Preparing server for deployment.
|
* Preparing server for deployment.
|
||||||
*/
|
*/
|
||||||
task('deploy:prepare', function () {
|
task('deploy:prepare', function () {
|
||||||
|
// Simple IF to check if shell is POSIX-compliant
|
||||||
|
try {
|
||||||
|
run('if [ ! -d {{deploy_path}} ]; then echo ""; fi');
|
||||||
|
}
|
||||||
|
catch(\RuntimeException $e){
|
||||||
|
throw new \RuntimeException('Shell on your server is not POSIX-compliant. Please change to sh, bash or similar. '
|
||||||
|
.PHP_EOL.'Usually, you can change your shell to bash by running: chsh -s /bin/bash');
|
||||||
|
}
|
||||||
|
|
||||||
// Create releases dir.
|
// Create releases dir.
|
||||||
run("cd {{deploy_path}} && if [ ! -d releases ]; then mkdir releases; fi");
|
run("cd {{deploy_path}} && if [ ! -d releases ]; then mkdir releases; fi");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user