Skip to content

Commit

Permalink
add deploy file for test server
Browse files Browse the repository at this point in the history
  • Loading branch information
amouhzi committed Jul 29, 2014
1 parent 2324dc9 commit 4a5a95e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/server/php-curl-test/deploy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

// The commands
$commands = array(
'cd ../../.. && git pull',
);

// Run the commands for output
$output = '';
foreach($commands AS $command){
// Run it
$tmp = shell_exec($command);
// Output
$output .= "<span style=\"color: #6BE234;\">\$</span> <span style=\"color: #729FCF;\">{$command}\n</span>";
$output .= htmlentities(trim($tmp)) . "\n";
}

// Make it pretty for manual user access (and why not?)
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>GIT DEPLOYMENT SCRIPT</title>
</head>
<body style="background-color: #000000; color: #FFFFFF; font-weight: bold; padding: 0 10px;">
<pre>
. ____ . ____________________________
|/ \| | |
[| <span style="color: #FF0000;">&hearts; &hearts;</span> |] | Git Deployment Script v0.1 |
|___==___| / &copy; oodavid 2012 |
|____________________________|

<?php echo $output; ?>
</pre>
</body>
</html>

0 comments on commit 4a5a95e

Please sign in to comment.