-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPublishDMS.ps1
More file actions
64 lines (52 loc) · 1.34 KB
/
PublishDMS.ps1
File metadata and controls
64 lines (52 loc) · 1.34 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
# Overview : Publish DMS Projects in the list
$msbuild = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
# Project root : Make sure it doesn't have a \ at the end!
$Root = "$PSScriptRoot\src"
$Output = "$($env:USERPROFILE)\DMS\publish"
cd $msbuild
# Project names
$Projects = @(
'API',
'Blocking',
'Cleanup',
'DbInteractions',
'Delius.Parser',
'Import',
'Kickoff',
'Logging',
'Meow',
'Matching.Engine',
'Offloc.Cleaner',
'Offloc.Parser',
'Orchestrator',
'Visualiser'
)
$DbProjects = @(
'ClusterDb',
'MatchingDb',
'OfflocRunningPictureDb',
'OfflocStagingDb',
'DeliusRunningPictureDb',
'DeliusStagingDb'
)
# Delete old publishes
If (test-path $Output)
{
Remove-Item $Output\* -Force -Recurse
}
# Publish the projects
foreach ($P in $Projects) {
$Command = "dotnet publish $Root\$P\$P.csproj -c Release --runtime win-x64 --output $Output\app\$P"
Invoke-Expression $Command
}
$dbOutputPath = "$Output\db\build"
# Publish the db projects
foreach ($P in $DbProjects) {
.\msbuild.exe $Root\$P\$P.sqlproj /p:OutputPath="$dbOutputPath" /p:Configuration=Release /t:Rebuild
Copy-Item "$dbOutputPath\$P*.sql" -Destination "$dbOutputPath\.."
}
If (test-path $dbOutputPath)
{
Remove-Item $dbOutputPath -Recurse -Force
}
cd $PSScriptRoot