11param (
2- [ValidateSet (" all" , " netframework" , " net6.0-win32" , " net6.0-win64" , " net6.0-linux64" , " net6.0-osx64" , " netcoreapp3.1-win32" , " netcoreapp3.1-win64" , " netcoreapp3.1-linux64" , " netcoreapp3.1-osx64" )]
2+ [ValidateSet (" all" , " netframework" , " net6.0-win32" , " net6.0-win64" , " net6.0-win-arm " , " net6.0-win-arm64 " , " net6.0- linux64" , " net6.0-linux-arm " , " net6.0-linux-arm64 " , " net6.0- osx64" , " netcoreapp3.1-win32" , " netcoreapp3.1-win64" , " netcoreapp3.1-win-arm " , " netcoreapp3.1-win-arm64 " , " netcoreapp3.1- linux64" , " netcoreapp3.1-linux-arm " , " netcoreapp3.1-linux-arm64 " , " netcoreapp3.1-osx64" )]
33 [string ]$framework = ' all' ,
44 ${-no-msbuild}
55)
@@ -12,11 +12,21 @@ function BuildNETFramework {
1212 Write-Host ' Building .NET Framework x86 and x64 binaries'
1313 if (${-no-msbuild} ) {
1414 dotnet build - v:m - c $configuration
15- if ($LASTEXITCODE ) { exit $LASTEXITCODE }
15+ if ($LASTEXITCODE ) {
16+ Write-Host
17+ Write-Host ==========================
18+ Write-Host " THE BUILD OPERATION ENCOUNTERED AN ERROR. EXIT CODE: $LASTEXITCODE " - ForegroundColor Red
19+ exit $LASTEXITCODE
20+ }
1621 }
1722 else {
1823 msbuild - v:m - m - restore - t:Build - p:Configuration= $configuration
19- if ($LASTEXITCODE ) { exit $LASTEXITCODE }
24+ if ($LASTEXITCODE ) {
25+ Write-Host
26+ Write-Host ==========================
27+ Write-Host " THE BUILD OPERATION ENCOUNTERED AN ERROR. EXIT CODE: $LASTEXITCODE " - ForegroundColor Red
28+ exit $LASTEXITCODE
29+ }
2030 }
2131}
2232
@@ -29,24 +39,46 @@ function BuildNETCore {
2939
3040 if (${-no-msbuild} ) {
3141 dotnet publish NETReactorSlayer.NETCore.Publish.slnf - v:m - c $configuration -f $tfm - r $runtimeidentifier -- self- contained - p:IncludeNativeLibrariesForSelfExtract= true - p:PublishTrimmed= True - p:PublishSingleFile= true
32- if ($LASTEXITCODE ) { exit $LASTEXITCODE }
42+ if ($LASTEXITCODE ) {
43+ Write-Host
44+ Write-Host ==========================
45+ Write-Host " THE BUILD OPERATION ENCOUNTERED AN ERROR. EXIT CODE: $LASTEXITCODE " - ForegroundColor Red
46+ exit $LASTEXITCODE
47+ }
3348 }
3449 else {
3550 msbuild NETReactorSlayer.NETCore.Publish.slnf - v:m - m - restore - t:Publish - p:Configuration= $configuration - p:TargetFramework= $tfm - p:RuntimeIdentifier= $runtimeidentifier - p:SelfContained= True - p:IncludeNativeLibrariesForSelfExtract= true - p:PublishTrimmed= True - p:PublishSingleFile= true
36- if ($LASTEXITCODE ) { exit $LASTEXITCODE }
51+ if ($LASTEXITCODE ) {
52+ Write-Host
53+ Write-Host ==========================
54+ Write-Host " THE BUILD OPERATION ENCOUNTERED AN ERROR. EXIT CODE: $LASTEXITCODE " - ForegroundColor Red
55+ exit $LASTEXITCODE
56+ }
3757 }
3858}
3959
4060if ($framework -eq ' all' ) {
4161 BuildNETFramework
4262 BuildNETCore win- x86 " net6.0"
4363 BuildNETCore win- x64 " net6.0"
64+ BuildNETCore win- arm " net6.0"
65+ BuildNETCore win- arm64 " net6.0"
4466 BuildNETCore linux- x64 " net6.0"
67+ BuildNETCore linux- arm " net6.0"
68+ BuildNETCore linux- arm64 " net6.0"
4569 BuildNETCore osx- x64 " net6.0"
4670 BuildNETCore win- x86 " netcoreapp3.1"
4771 BuildNETCore win- x64 " netcoreapp3.1"
72+ BuildNETCore win- arm " netcoreapp3.1"
73+ BuildNETCore win- arm64 " netcoreapp3.1"
4874 BuildNETCore linux- x64 " netcoreapp3.1"
75+ BuildNETCore linux- arm " netcoreapp3.1"
76+ BuildNETCore linux- arm64 " netcoreapp3.1"
4977 BuildNETCore osx- x64 " netcoreapp3.1"
78+
79+ Write-Host
80+ Write-Host ==========================
81+ Write-Host " BUILD OPERATION COMPLETED SUCCESSFULLY" - ForegroundColor Green
5082}
5183else {
5284 if ($framework -eq ' netframework' ){
@@ -58,9 +90,21 @@ else {
5890 elseif ($framework -eq ' net6.0-win64' ){
5991 BuildNETCore win- x64 ' net6.0'
6092 }
93+ elseif ($framework -eq ' net6.0-win-arm' ){
94+ BuildNETCore win- arm ' net6.0'
95+ }
96+ elseif ($framework -eq ' net6.0-win-arm64' ){
97+ BuildNETCore win- arm64 ' net6.0'
98+ }
6199 elseif ($framework -eq ' net6.0-linux64' ){
62100 BuildNETCore linux- x64 ' net6.0'
63101 }
102+ elseif ($framework -eq ' net6.0-linux-arm' ){
103+ BuildNETCore linux- arm ' net6.0'
104+ }
105+ elseif ($framework -eq ' net6.0-linux-arm64' ){
106+ BuildNETCore linux- arm64 ' net6.0'
107+ }
64108 elseif ($framework -eq ' net6.0-osx64' ){
65109 BuildNETCore osx- x64 ' net6.0'
66110 }
@@ -70,10 +114,26 @@ else {
70114 elseif ($framework -eq ' netcoreapp3.1-win64' ){
71115 BuildNETCore win- x64 ' netcoreapp3.1'
72116 }
117+ elseif ($framework -eq ' netcoreapp3.1-win-arm' ){
118+ BuildNETCore win- arm ' netcoreapp3.1'
119+ }
120+ elseif ($framework -eq ' netcoreapp3.1-win-arm64' ){
121+ BuildNETCore win- arm64 ' netcoreapp3.1'
122+ }
73123 elseif ($framework -eq ' netcoreapp3.1-linux64' ){
74124 BuildNETCore linux- x64 ' netcoreapp3.1'
75125 }
126+ elseif ($framework -eq ' netcoreapp3.1-linux-arm' ){
127+ BuildNETCore linux- arm ' netcoreapp3.1'
128+ }
129+ elseif ($framework -eq ' netcoreapp3.1-linux-arm64' ){
130+ BuildNETCore linux- arm64 ' netcoreapp3.1'
131+ }
76132 elseif ($framework -eq ' netcoreapp3.1-osx64' ){
77133 BuildNETCore osx- x64 ' netcoreapp3.1'
78134 }
135+
136+ Write-Host
137+ Write-Host ==========================
138+ Write-Host " BUILD OPERATION COMPLETED SUCCESSFULLY" - ForegroundColor Green
79139}
0 commit comments