This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
forked from MindscapeHQ/raygun4net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildSigned.ps1
54 lines (47 loc) · 3.24 KB
/
buildSigned.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
50
51
52
53
54
properties {
$root = $psake.build_script_dir
$solution_file = "$root/Mindscape.Raygun4Net.sln"
$solution_file_client_profile = "$root/Mindscape.Raygun4Net.ClientProfile.sln"
$solution_file2 = "$root/Mindscape.Raygun4Net2.sln"
$solution_file4 = "$root/Mindscape.Raygun4Net4.sln"
$solution_file4_client_profile = "$root/Mindscape.Raygun4Net4.ClientProfile.sln"
$solution_file_winrt = "$root/Mindscape.Raygun4Net.WinRT.sln"
$solution_file_mvc = "$root/Mindscape.Raygun4Net.Mvc.sln"
$solution_file_webapi = "$root/Mindscape.Raygun4Net.WebApi.sln"
$configuration = "Sign"
$build_dir = "$root\build\"
$signed_build_dir = "$build_dir\signed"
$signed_build_dir_client_profile = "$build_dir\signed\Net3.ClientProfile"
$signed_build_dir2 = "$build_dir\signed\Net2"
$signed_build_dir4 = "$build_dir\signed\Net4"
$signed_build_dir4_client_profile = "$build_dir\signed\Net4.ClientProfile"
$signed_build_mvc = "$build_dir\signed\Mvc"
$signed_build_webapi = "$build_dir\signed\WebApi"
$nuget_dir = "$root\.nuget"
$env:Path += ";$nuget_dir"
}
task default -depends Compile, CompileWinRT
task Clean {
remove-item -force -recurse $signed_build_dir -ErrorAction SilentlyContinue | Out-Null
}
task Init -depends Clean {
new-item $signed_build_dir -itemType directory | Out-Null
}
task Compile -depends Init {
exec { msbuild "$solution_file" /m /p:OutDir=$signed_build_dir /p:Configuration=$configuration }
exec { msbuild "$solution_file2" /m /p:OutDir=$signed_build_dir2 /p:Configuration=$configuration }
exec { msbuild "$solution_file4" /m /p:OutDir=$signed_build_dir4 /p:Configuration=$configuration }
exec { msbuild "$solution_file_client_profile" /m /p:OutDir=$signed_build_dir_client_profile /p:Configuration=$configuration }
exec { msbuild "$solution_file4_client_profile" /m /p:OutDir=$signed_build_dir4_client_profile /p:Configuration=$configuration }
exec { msbuild "$solution_file_mvc" /m /p:OutDir=$signed_build_mvc /p:Configuration=$configuration }
exec { msbuild "$solution_file_webapi" /m /p:OutDir=$signed_build_webapi /p:Configuration=$configuration }
}
task CompileWinRT -depends Init {
exec { msbuild "$solution_file_winrt" /m /p:OutDir=$signed_build_dir /p:Configuration=$configuration }
move-item $signed_build_dir/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.dll $signed_build_dir
move-item $signed_build_dir/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.pdb $signed_build_dir
move-item $signed_build_dir/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.dll $signed_build_dir
move-item $signed_build_dir/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.pdb $signed_build_dir
remove-item -force -recurse $signed_build_dir/Mindscape.Raygun4Net.WinRT -ErrorAction SilentlyContinue | Out-Null
remove-item -force -recurse $signed_build_dir/Mindscape.Raygun4Net.WinRT.Tests -ErrorAction SilentlyContinue | Out-Null
}