From 3c1ad546cf097343f7ae83f7830767a8eacb7221 Mon Sep 17 00:00:00 2001 From: Abdessamad Idrissi Date: Sun, 31 May 2020 11:44:24 +0200 Subject: [PATCH 1/2] Unable to read the `.env` environment file This fixes issues like https://github.com/EasyCorp/easy-deploy-bundle/issues/87 ``` Unable to read the "... .env" environment file. in ... ``` --- src/Deployer/DefaultDeployer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Deployer/DefaultDeployer.php b/src/Deployer/DefaultDeployer.php index fa28adc..8aa1b0f 100644 --- a/src/Deployer/DefaultDeployer.php +++ b/src/Deployer/DefaultDeployer.php @@ -261,7 +261,7 @@ private function doUpdateCode(): void $this->runRemote(sprintf('if [ -d {{ deploy_dir }}/repo ]; then cd {{ deploy_dir }}/repo && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard %s && git clean -q -d -x -f; else git clone -q -b %s %s {{ deploy_dir }}/repo && cd {{ deploy_dir }}/repo && git checkout -q -b deploy %s; fi', $repositoryRevision, $this->getConfig(Option::repositoryBranch), $this->getConfig(Option::repositoryUrl), $repositoryRevision)); $this->log('

Copying the updated code to the new release directory'); - $this->runRemote(sprintf('cp -RPp {{ deploy_dir }}/repo/* {{ project_dir }}')); + $this->runRemote(sprintf('cp -pPRT {{ deploy_dir }}/repo/* {{ project_dir }}')); } private function doCreateCacheDir(): void From 6fa1223916b9555ad3b0fad1c490bef919d061a6 Mon Sep 17 00:00:00 2001 From: Abdessamad Idrissi Date: Mon, 1 Jun 2020 14:55:22 +0200 Subject: [PATCH 2/2] Fix typo --- src/Deployer/DefaultDeployer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Deployer/DefaultDeployer.php b/src/Deployer/DefaultDeployer.php index 8aa1b0f..7c2f2b1 100644 --- a/src/Deployer/DefaultDeployer.php +++ b/src/Deployer/DefaultDeployer.php @@ -261,7 +261,7 @@ private function doUpdateCode(): void $this->runRemote(sprintf('if [ -d {{ deploy_dir }}/repo ]; then cd {{ deploy_dir }}/repo && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard %s && git clean -q -d -x -f; else git clone -q -b %s %s {{ deploy_dir }}/repo && cd {{ deploy_dir }}/repo && git checkout -q -b deploy %s; fi', $repositoryRevision, $this->getConfig(Option::repositoryBranch), $this->getConfig(Option::repositoryUrl), $repositoryRevision)); $this->log('

Copying the updated code to the new release directory'); - $this->runRemote(sprintf('cp -pPRT {{ deploy_dir }}/repo/* {{ project_dir }}')); + $this->runRemote(sprintf('cp -pPRT {{ deploy_dir }}/repo/ {{ project_dir }}')); } private function doCreateCacheDir(): void