-
Notifications
You must be signed in to change notification settings - Fork 46
/
nuget-build.ps1
151 lines (125 loc) · 6.14 KB
/
nuget-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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Set-ExecutionPolicy -Scope CurrentUser Unrestricted
# Make sure msbuild.exe is in your path - C:\Windows\Microsoft.NET\Framework64\v4.0.30319
# Make sure nuget.exe is in your path
# nuget push NsqSharp.x.y.z.nupkg
### Build Tests
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.6.2 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net462"
if ($LastExitCode -ne 0) {
echo ".NET 4.6.2 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.6.1 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net461"
if ($LastExitCode -ne 0) {
echo ".NET 4.6.1 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.6 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net46"
if ($LastExitCode -ne 0) {
echo ".NET 4.6 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.5.2 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net452"
if ($LastExitCode -ne 0) {
echo ".NET 4.5.2 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.5.1 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net451"
if ($LastExitCode -ne 0) {
echo ".NET 4.5.1 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.5 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net45"
if ($LastExitCode -ne 0) {
echo ".NET 4.5 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp.Tests/NsqSharp.Tests.csproj /p:TargetFrameworkVersion=v4.0 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget-tests/net40"
if ($LastExitCode -ne 0) {
echo ".NET 4.0 Tests Build failed. Process exited with error code $LastExitCode."
Return
}
### Run Tests
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net462/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.6.2 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.6.2 All tests passed."
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net461/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.6.1 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.6.1 All tests passed."
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net46/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.6 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.6 All tests passed."
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net452/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.5.2 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.5.2 All tests passed."
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net451/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.5.1 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.5.1 All tests passed."
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net45/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.5 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.5 All tests passed."
.\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe ./nuget-tests/net40/NsqSharp.Tests.dll
if ($LastExitCode -ne 0) {
echo ".NET 4.0 Tests failed. Process exited with error code $LastExitCode."
Return
}
echo "*** .NET 4.0 All tests passed."
### Build Nuget DLL's
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.6.2 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net462"
if ($LastExitCode -ne 0) {
echo ".NET 4.6.2 Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.6.1 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net461"
if ($LastExitCode -ne 0) {
echo ".NET 4.6.1 Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.6 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net46"
if ($LastExitCode -ne 0) {
echo ".NET 4.6 Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.5.2 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net452"
if ($LastExitCode -ne 0) {
echo ".NET 4.5.2 Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.5.1 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net451"
if ($LastExitCode -ne 0) {
echo ".NET 4.5.1 Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.5 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net45"
if ($LastExitCode -ne 0) {
echo ".NET 4.5 Build failed. Process exited with error code $LastExitCode."
Return
}
msbuild NsqSharp/NsqSharp.csproj /p:TargetFrameworkVersion=v4.0 /p:Configuration="Integration Tests" /t:Clean /t:Rebuild /p:OutputPath="../nuget/lib/net40"
if ($LastExitCode -ne 0) {
echo ".NET 4.0 Build failed. Process exited with error code $LastExitCode."
Return
}
### Nuget Pack
nuget pack nuget/NsqSharp.nuspec
if ($LastExitCode -ne 0) {
echo "Nuget pack failed. Process exited with error code $LastExitCode."
Return
}