-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon.d
45 lines (35 loc) · 809 Bytes
/
common.d
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
42
43
44
45
import std.algorithm;
import ae.sys.log;
import ae.utils.sini;
struct Config
{
string token;
string[string] env;
string basePulls;
string webRoot = "http://dtest.dlang.io/";
string[] ignoredBranches;
int timeout = 30 * 60;
}
immutable Config config;
shared static this()
{
config = cast(immutable)
loadIni!Config("autotest.ini");
}
// ***************************************************************************
void log(string s)
{
if (logOverride)
return logOverride(s);
static Logger instance;
if (!instance)
instance = createLogger("DAutoTest");
instance(s);
}
void delegate(string) logOverride;
// ***************************************************************************
bool fileIgnored(string fn)
{
return fn.startsWith("digger-");
}
const eventFile = "pull-pending.txt";