Skip to content

Commit c5673ef

Browse files
committed
Merge branch 'release/1.0.1'
2 parents b1bba80 + 8f10331 commit c5673ef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

deploy.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
define('REMOTE_REPOSITORY', 'https://github.com/markomarkovic/simple-php-git-deploy.git');
2222

2323
/**
24-
* This is where the code resides on the local machine.
25-
* Don't forget the trailing slash!
24+
* Which branch are we going to use for deployment.
2625
*/
27-
define('TARGET_DIR', '/tmp/simple-php-git-deploy/');
26+
define('BRANCH', 'master');
2827

2928
/**
30-
* Which branch are we going to use for deployment.
29+
* This is where the code resides on the local machine.
30+
* Don't forget the trailing slash!
3131
*/
32-
define('BRANCH', 'master');
32+
define('TARGET_DIR', '/tmp/simple-php-git-deploy/');
3333

3434
/**
3535
* Weather to delete the files that are not in the repository but are on the
@@ -107,9 +107,10 @@
107107
die(sprintf('<b>%s</b> not available. It need to be installed on the server for this script to work.', $command));
108108
} else {
109109
$binaries[$command] = $path;
110+
$version = explode("\n", shell_exec($path.' --version'));
110111
printf('<b>%s</b> : %s'."\n"
111112
, $path
112-
, explode("\n", shell_exec($path.' --version'))[0]
113+
, $version[0]
113114
);
114115
}
115116
}
@@ -175,7 +176,6 @@
175176
);
176177

177178
// Run the commands
178-
$output = '';
179179
foreach ($commands as $command) {
180180
set_time_limit(TIME_LIMIT); // Reset the time limit for each command
181181
chdir(TMP_DIR); // Ensure that we're in the right directory

0 commit comments

Comments
 (0)