forked from Taritsyn/MsieJavaScriptEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile.shade
More file actions
88 lines (70 loc) · 2.5 KB
/
Copy pathmakefile.shade
File metadata and controls
88 lines (70 loc) · 2.5 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
use assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
use namespace="System"
use namespace="System.Collections"
use namespace="System.IO"
use import="Files"
use import="BuildEnv"
use import="Environment"
default BASE_DIR='${Directory.GetCurrentDirectory()}'
var AUTHORS='Andrey Taritsyn'
use-standard-lifecycle
#resx description='Converts .resx files to .Designer.cs' target='initialize'
@{
string currentDirPath;
string originalCurrentDirPath = Environment.GetEnvironmentVariable("ORIGINAL_CURRENT_DIR");
string vsProjectDirPath= Environment.GetEnvironmentVariable("VS_PROJECT_DIR");
if (!string.IsNullOrEmpty(vsProjectDirPath))
{
currentDirPath = vsProjectDirPath;
}
else if (!string.IsNullOrEmpty(originalCurrentDirPath))
{
currentDirPath = originalCurrentDirPath;
}
else
{
currentDirPath = BASE_DIR;
}
Log.Info(string.Format('Processing of resx-files in "{0}" directory:', currentDirPath));
foreach (var filePath in Directory.EnumerateFiles(currentDirPath, "*.resx", SearchOption.AllDirectories))
{
GenerateResx(filePath);
string relativeFilePath = filePath.Substring(currentDirPath.Length);
Log.Info(string.Format(' * "{0}" is processed', relativeFilePath));
}
Log.Info('');
}
#run-dotnet-tests description='Runs a unit tests for DotNet version'
@{
string testDirPath = Path.Combine(BASE_DIR, "test");
string[] testProjectDirPaths = {
'MsieJavaScriptEngine.Test.Common',
'MsieJavaScriptEngine.Test.Auto',
'MsieJavaScriptEngine.Test.ChakraEdgeJsRt',
'MsieJavaScriptEngine.Test.ChakraIeJsRt',
'MsieJavaScriptEngine.Test.ChakraActiveScript',
'MsieJavaScriptEngine.Test.Classic'
};
Log.Info('Run unit tests for DotNet version:');
Log.Info('');
foreach (string testProjectDirPath in testProjectDirPaths)
{
Exec('dotnet', string.Format('test {0}', testProjectDirPath), testDirPath);
}
Log.Info('');
}
#run-net4-tests description='Runs a unit tests for .NET 4.0 version'
@{
string nunitConsolePath = "packages/NUnit.ConsoleRunner/tools/nunit3-console.exe";
string testDirPath = Path.Combine(BASE_DIR, "test");
Log.Info('Run unit tests for .NET 4.0 version:');
Log.Info('');
Exec(nunitConsolePath, 'MsieJavaScriptEngine.Test.Net4.nunit --verbose', testDirPath);
Log.Info('');
}
macro name="GenerateResx" resxFile='string'
generate-resx
macro name='Exec' program='string' commandline='string'
exec
macro name='Exec' program='string' commandline='string' workingdir='string'
exec