forked from dotnet/efcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.shade
53 lines (47 loc) · 2.21 KB
/
makefile.shade
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
use namespace="System.IO"
use namespace="System.IO.Compression"
use namespace="System.Linq"
default BASE_DIR_LOCAL='${Directory.GetCurrentDirectory()}'
default BUILD_DIR_LOCAL='${Path.Combine(BASE_DIR_LOCAL, "artifacts", "build")}'
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft Open Technologies, Inc.'
-BuildQuality = '';
use-standard-lifecycle
k-standard-goals
#csproj-initialize target='initialize' if='(!IsMono && !IsTeamCity && E("APPVEYOR") == null) || E("IsEFPerfBuild") != null'
var programFilesX86='${Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)}'
var buildProgram='${Path.Combine(programFilesX86, "MSBuild", "14.0", "Bin", "MSBuild.exe")}'
for each='var projectFile in Files.Include("src/**/*.csproj").Include("test/**/*.csproj")'
exec program='${buildProgram}' commandline='${projectFile} /t:GenerateProjectLockTargets /v:m /nologo /p:Configuration=${E("Configuration")}'
#publish-efci-artifacts target="test-compile" if='IsTeamCity'
@{
// produce .NET Core test artifacts for testing
var testProjects = Files.Include("test/Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests/project.json")
.Include("test/Microsoft.EntityFrameworkCore.SqlServer.Design.FunctionalTests/project.json");
var tfm = "netcoreapp1.0";
foreach (var projectFile in testProjects)
{
var projectName = Path.GetFileName(Path.GetDirectoryName(projectFile));
var output = Path.Combine(Directory.GetCurrentDirectory(), "artifacts/tests", projectName, tfm);
Dotnet(string.Format("publish --configuration Release --output {0} --framework {1} {2}", output, tfm, projectFile));
}
}
#remove-intermediates
@{
Directory.CreateDirectory(BUILD_DIR_LOCAL);
foreach (var p in Files
.Include(Path.Combine(BUILD_DIR_LOCAL, "**\\Tools.*.nupkg"))
)
{
Log.Info("Deleting " + p);
File.Delete(p);
}
}
#repack-tools .remove-intermediates target='compile' if='Directory.Exists("src") && !IsTravisCi'
@{
var configurationX86 = E("Configuration") + "_x86";
DotnetBuild("src/Tools.Console", configurationX86, "net451");
Dotnet("restore tools/");
Dotnet("run -p tools/CommandsPackager " + E("Configuration"));
}