Skip to content

Commit 4a5a95e

Browse files
committed
add deploy file for test server
1 parent 2324dc9 commit 4a5a95e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
// The commands
4+
$commands = array(
5+
'cd ../../.. && git pull',
6+
);
7+
8+
// Run the commands for output
9+
$output = '';
10+
foreach($commands AS $command){
11+
// Run it
12+
$tmp = shell_exec($command);
13+
// Output
14+
$output .= "<span style=\"color: #6BE234;\">\$</span> <span style=\"color: #729FCF;\">{$command}\n</span>";
15+
$output .= htmlentities(trim($tmp)) . "\n";
16+
}
17+
18+
// Make it pretty for manual user access (and why not?)
19+
?>
20+
<!DOCTYPE HTML>
21+
<html lang="en-US">
22+
<head>
23+
<meta charset="UTF-8">
24+
<title>GIT DEPLOYMENT SCRIPT</title>
25+
</head>
26+
<body style="background-color: #000000; color: #FFFFFF; font-weight: bold; padding: 0 10px;">
27+
<pre>
28+
. ____ . ____________________________
29+
|/ \| | |
30+
[| <span style="color: #FF0000;">&hearts; &hearts;</span> |] | Git Deployment Script v0.1 |
31+
|___==___| / &copy; oodavid 2012 |
32+
|____________________________|
33+
34+
<?php echo $output; ?>
35+
</pre>
36+
</body>
37+
</html>

0 commit comments

Comments
 (0)