-
Notifications
You must be signed in to change notification settings - Fork 5
/
Build.ps1
49 lines (38 loc) · 908 Bytes
/
Build.ps1
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
param (
[switch]$SetAssemblyVersion,
[switch]$Build,
[switch]$BuildHtml,
[switch]$GenerateDocs,
[switch]$Pack,
[switch]$Publish
)
# Load Toolkit
. ".build\BuildToolkit.ps1"
# Initialize Toolkit
Invoke-Initialize -Version (Get-Content "VERSION");
if ($SetAssemblyVersion) {
# Patch version
$versionFile = "src\Moryx.Runtime.Maintenance.Web.UI\src\Version.ts"
(Get-Content $versionFile) | Foreach-Object {
$_ -replace '%VERSION%', "$env:MORYX_INFORMATIONAL_VERSION"
} | Set-Content $versionFile
}
if ($BuildHtml) {
cd src/Moryx.Runtime.Maintenance.Web.UI
npm run build
mkdir -p ../../artifacts/web
cp -R dist/* ../../artifacts/web/
}
if ($Build) {
Invoke-Build ".\Maintenance.Web.sln"
}
if ($GenerateDocs) {
Invoke-DocFx
}
if ($Pack) {
Invoke-PackAll -Symbols
}
if ($Publish) {
Invoke-Publish
}
Write-Host "Success!"