forked from Ocramius/Exam
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsismo.config.php
More file actions
42 lines (33 loc) · 1.23 KB
/
Copy pathsismo.config.php
File metadata and controls
42 lines (33 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
$notifier = new Sismo\Notifier\DBusNotifier();
// add a project with custom settings
$sf2 = new Sismo\Project('exam');
$sf2->setRepository('/home/cordoval/sites-2/exam');
$sf2->setBranch('master');
// phpspec command
$phpspecCommand = '/home/cordoval/sites-2/exam/phpspec-composer.php';
$phpspecFolder = '/home/cordoval/sites-2/exam/lib/PHPPeru/Exam/Spec';
//$longCommand = 'find ' . $phpspecFolder . '*.php -exec ' . $phpspecCommand . ' \'{}\' -f documentation --color \\;';
//$longCommand = 'composer install;'. $phpspecCommand . ' ' . $phpspecFolder . ' -f documentation --color';
$longCommand = 'composer install; ./develop';
// sets command, slug, commit links and notifier
$sf2->setCommand($longCommand);
$sf2->setSlug('exam');
$sf2->setUrlPattern('http://localhost:8000/?p=.git;a=commitdiff;h=%commit%');
$sf2->addNotifier($notifier);
$subject = '[%status_code%] %name% (%short_sha%)';
$message = <<<MESSAGE
<h1>Build status changed to %STATUS%.</h1>
<strong>commit: %sha%</strong>
<strong>Author: %author%</strong>
<p>
%message%
</p>
<h3> Sismo reports:</h3>
<p>
%output%
</p>
MESSAGE;
$swiftNotifier = new Sismo\Notifier\SwiftNotifier('cordoval@gmail.com', $subject, $message);
$sf2->addNotifier($swiftNotifier);
return $sf2;