Created
October 21, 2012 04:04
-
-
Save mauris/3925647 to your computer and use it in GitHub Desktop.
Test Agent - Pull, Detect, Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
if($argc > 1){ | |
chdir($argv[1]); | |
} | |
echo "Test Agent\n"; | |
echo "Updating repository..."; | |
exec('git pull --quiet'); | |
echo " done!\n"; | |
echo "Detecting test script..."; | |
$script = trim(shell_exec('grep "^script: *" .travis.yml')); | |
echo " done!\n"; | |
$script = substr($script, 8); | |
echo "Executing test $script...\n"; | |
echo shell_exec($script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment