forked from dotnet/efcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile.shade
More file actions
48 lines (41 loc) · 2.26 KB
/
makefile.shade
File metadata and controls
48 lines (41 loc) · 2.26 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
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft Open Technologies, Inc.'
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")}'
#compile-tests target='compile'
@{
var BASE_DIR = Directory.GetCurrentDirectory();
var TARGET_DIR = Path.Combine(BASE_DIR, "artifacts");
var BUILD_DIR = Path.Combine(TARGET_DIR, "build");
var Configuration = E("Configuration") ?? "Debug";
var projectFiles = Files.Include("test/Microsoft.EntityFrameworkCore.Relational.FunctionalTests/project.json")
.Include("test/Microsoft.EntityFrameworkCore.FunctionalTests/project.json")
.Include("test/Microsoft.EntityFrameworkCore.Relational.Design.FunctionalTests/project.json");
foreach (var projectFile in projectFiles)
{
DotnetPack(projectFile, BUILD_DIR, Configuration);
}
foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*.FunctionalTests/" + Configuration + "/*.nupkg")))
{
File.Copy(nupkg, Path.Combine(BUILD_DIR, Path.GetFileName(nupkg)), true);
}
}
#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 = "netstandardapp1.5";
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));
}
}