@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | $path = $this->args['path']; |
| 19 | 19 | $repo = $this->args['repo']; |
| 20 | 20 | $env = $this->args['env']; |
| 21 | - $logfile = DEPLOYNAUT_LOG_PATH . '/clonegitrepo.log'; |
|
| 21 | + $logfile = DEPLOYNAUT_LOG_PATH.'/clonegitrepo.log'; |
|
| 22 | 22 | $fh = fopen($logfile, 'a'); |
| 23 | 23 | if(!$fh) { |
| 24 | 24 | throw new RuntimeException(sprintf('Can\'t open file "%s" for logging.', $logfile)); |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | $command[] = sprintf('rm -rf %s', $path); |
| 36 | 36 | |
| 37 | - fwrite($fh, sprintf('[%s] Cleaning up existing repository %s', date('Y-m-d H:i:s'), $path) . PHP_EOL); |
|
| 38 | - fwrite($fh, sprintf('[%s] Running command: %s', date('Y-m-d H:i:s'), implode(' ', $command)) . PHP_EOL); |
|
| 37 | + fwrite($fh, sprintf('[%s] Cleaning up existing repository %s', date('Y-m-d H:i:s'), $path).PHP_EOL); |
|
| 38 | + fwrite($fh, sprintf('[%s] Running command: %s', date('Y-m-d H:i:s'), implode(' ', $command)).PHP_EOL); |
|
| 39 | 39 | |
| 40 | 40 | $process = new \Symfony\Component\Process\Process(implode(' ', $command)); |
| 41 | 41 | $process->setEnv($env); |
@@ -46,12 +46,12 @@ discard block |
||
| 46 | 46 | '[%s] Error cleaning up existing repository: %s', |
| 47 | 47 | date('Y-m-d H:i:s'), |
| 48 | 48 | $process->getErrorOutput() |
| 49 | - ) . PHP_EOL); |
|
| 49 | + ).PHP_EOL); |
|
| 50 | 50 | throw new RuntimeException($process->getErrorOutput()); |
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - fwrite($fh, sprintf('[%s] Cloning repository %s to %s', date('Y-m-d H:i:s'), $repo, $path) . PHP_EOL); |
|
| 54 | + fwrite($fh, sprintf('[%s] Cloning repository %s to %s', date('Y-m-d H:i:s'), $repo, $path).PHP_EOL); |
|
| 55 | 55 | |
| 56 | 56 | $command = array(); |
| 57 | 57 | if(!empty($user)) { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | $command[] = sprintf('git clone --bare -q %s %s', $repo, $path); |
| 61 | 61 | |
| 62 | - fwrite($fh, sprintf('[%s] Running command: %s', date('Y-m-d H:i:s'), implode(' ', $command)) . PHP_EOL); |
|
| 62 | + fwrite($fh, sprintf('[%s] Running command: %s', date('Y-m-d H:i:s'), implode(' ', $command)).PHP_EOL); |
|
| 63 | 63 | |
| 64 | 64 | $process = new \Symfony\Component\Process\Process(implode(' ', $command)); |
| 65 | 65 | $process->setEnv($env); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $repo, |
| 73 | 73 | $path, |
| 74 | 74 | $process->getErrorOutput() |
| 75 | - ) . PHP_EOL); |
|
| 75 | + ).PHP_EOL); |
|
| 76 | 76 | throw new RuntimeException($process->getErrorOutput()); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | date('Y-m-d H:i:s'), |
| 82 | 82 | $repo, |
| 83 | 83 | $path |
| 84 | - ) . PHP_EOL); |
|
| 84 | + ).PHP_EOL); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | } |