@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * Generate the package |
31 | 31 | */ |
32 | 32 | public function generatePackage($sha, $baseDir, $outputFilename, DeploynautLogFile $log) { |
33 | - $tempPath = TEMP_FOLDER . "/" . str_replace(".tar.gz", "", basename($outputFilename)); |
|
33 | + $tempPath = TEMP_FOLDER."/".str_replace(".tar.gz", "", basename($outputFilename)); |
|
34 | 34 | if(!file_exists($tempPath)) { |
35 | 35 | mkdir($tempPath); |
36 | 36 | } |
@@ -42,17 +42,17 @@ discard block |
||
42 | 42 | // Execute these in sequence until there's a failure |
43 | 43 | $processes = array( |
44 | 44 | // Export the relevant SHA into a temp folder |
45 | - new AbortableProcess("git archive $sha | tar -x -C " . $escapedTempPath, $baseDir), |
|
45 | + new AbortableProcess("git archive $sha | tar -x -C ".$escapedTempPath, $baseDir), |
|
46 | 46 | // Run build script |
47 | 47 | new AbortableProcess($this->buildScript, $tempPath, null, null, 3600), |
48 | 48 | // Compress the result |
49 | - new AbortableProcess("tar -czf " . $escapedOutputFile . " " . $escapedTempDir, dirname($tempPath)), |
|
49 | + new AbortableProcess("tar -czf ".$escapedOutputFile." ".$escapedTempDir, dirname($tempPath)), |
|
50 | 50 | ); |
51 | 51 | |
52 | 52 | // Call at the end, regardless of success or failure |
53 | 53 | $cleanup = array( |
54 | 54 | // Delete the temporary staging folder |
55 | - new AbortableProcess("rm -rf " . $escapedTempPath), |
|
55 | + new AbortableProcess("rm -rf ".$escapedTempPath), |
|
56 | 56 | ); |
57 | 57 | |
58 | 58 | try { |
@@ -13,6 +13,10 @@ |
||
13 | 13 | * will still get called if we loop over ->isRunning. |
14 | 14 | */ |
15 | 15 | class SymfonyProcessFixer extends \Symfony\Component\Process\Process { |
16 | + |
|
17 | + /** |
|
18 | + * @param Closure $callback |
|
19 | + */ |
|
16 | 20 | public function run($callback = null) { |
17 | 21 | parent::start($callback); |
18 | 22 | while(parent::isRunning()) { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | sleep(1); |
21 | 21 | } |
22 | 22 | |
23 | - if ($this->hasBeenSignaled()) { |
|
23 | + if($this->hasBeenSignaled()) { |
|
24 | 24 | throw new RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->getTermSignal)); |
25 | 25 | } |
26 | 26 |