forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile.shade
74 lines (58 loc) · 2.83 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft Open Technologies, Inc.'
use-standard-lifecycle
k-standard-goals
default configuration='${E("Configuration")}'
default pack_options=' ${E("KOREBUILD_DOTNET_PACK_OPTIONS")}'
var baseDir='${Directory.GetCurrentDirectory()}'
var targetDir='${Path.Combine(baseDir, "artifacts")}'
var buildDir='${Path.Combine(targetDir, "build")}'
#build-core target='build-test'
@{
var orchardCoreDir = Path.Combine(baseDir, "src/Orchard.Web/Core");
foreach(var projectDir in Directory.GetDirectories(orchardCoreDir))
{
var dotnetArgs = string.Format("pack{0} {1} --configuration {2}", pack_options, projectDir, configuration ?? "Debug");
Dotnet(dotnetArgs);
var projectName=Path.GetFileName(projectDir);
var projectBinDir = Path.Combine(projectDir, "bin");
CopyFolder(projectBinDir, Path.Combine(buildDir, projectName), true);
foreach(var nupkg in Files.Include(Path.Combine(buildDir, projectName + "/" + configuration + "/*.nupkg")))
{
File.Copy(nupkg, Path.Combine(buildDir, Path.GetFileName(nupkg)), true);
}
}
}
#build-modules target='build-core'
@{
var orchardModulesDir = Path.Combine(baseDir, "src/Orchard.Web/Modules");
foreach(var projectDir in Directory.GetDirectories(orchardModulesDir))
{
var dotnetArgs = string.Format("pack{0} {1} --configuration {2}", pack_options, projectDir, configuration ?? "Debug");
Dotnet(dotnetArgs);
var projectName=Path.GetFileName(projectDir);
var projectBinDir = Path.Combine(projectDir, "bin");
CopyFolder(projectBinDir, Path.Combine(buildDir, projectName), true);
foreach(var nupkg in Files.Include(Path.Combine(buildDir, projectName + "/" + configuration + "/*.nupkg")))
{
File.Copy(nupkg, Path.Combine(buildDir, Path.GetFileName(nupkg)), true);
}
}
}
#build-themes target='build-modules'
@{
var orchardThemesDir = Path.Combine(baseDir, "src/Orchard.Web/Themes");
foreach(var projectDir in Directory.GetDirectories(orchardThemesDir))
{
var dotnetArgs = string.Format("pack{0} {1} --configuration {2}", pack_options, projectDir, configuration ?? "Debug");
Dotnet(dotnetArgs);
var projectName=Path.GetFileName(projectDir);
var projectBinDir = Path.Combine(projectDir, "bin");
CopyFolder(projectBinDir, Path.Combine(buildDir, projectName), true);
foreach(var nupkg in Files.Include(Path.Combine(buildDir, projectName + "/" + configuration + "/*.nupkg")))
{
File.Copy(nupkg, Path.Combine(buildDir, Path.GetFileName(nupkg)), true);
}
}
}