diff --git a/Build/build.ps1 b/Build/build.ps1 index ff439f0..9c5064a 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -43,17 +43,41 @@ Write-Host &$msbuild ..\Source\MQTTnet.Extensions.WebSocket4Net\MQTTnet.Extensions.WebSocket4Net.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" &$msbuild ..\Source\MQTTnet.Extensions.WebSocket4Net\MQTTnet.Extensions.WebSocket4Net.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" +#################################################################### -# Build MQTTnet.Server -Remove-Item ..\Source\MQTTnet.Server\bin\Release\netcoreapp2.2 -Recurse -Force -ErrorAction SilentlyContinue -&$msbuild ..\Source\MQTTnet.Server\MQTTnet.Server.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netcoreapp2.2" /p:publishprofile=FolderProfile /p:deployonbuild=true /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx" +# Build MQTTnet.Server Portable +&dotnet publish ..\Source\MQTTnet.Server\MQTTnet.Server.csproj --configuration Release -$source = "..\Source\MQTTnet.Server\bin\publish" +$source = "..\Source\MQTTnet.Server\bin\Release\netcoreapp2.2\publish" $destination = "..\Source\MQTTnet.Server\bin\MQTTnet.Server-Portable-v$nugetVersion.zip" If(Test-path $destination) {Remove-item $destination} Add-Type -assembly "system.io.compression.filesystem" [io.compression.zipfile]::CreateFromDirectory($source, $destination) +#################################################################### + +# Build MQTTnet.Server Linux-x64 +&dotnet publish ..\Source\MQTTnet.Server\MQTTnet.Server.csproj --configuration Release --self-contained --runtime linux-x64 + +$source = "..\Source\MQTTnet.Server\bin\Release\netcoreapp2.2\linux-x64\publish" +$destination = "..\Source\MQTTnet.Server\bin\MQTTnet.Server-Linux-x64-v$nugetVersion.zip" +If(Test-path $destination) {Remove-item $destination} + Add-Type -assembly "system.io.compression.filesystem" +[io.compression.zipfile]::CreateFromDirectory($source, $destination) + +#################################################################### + +# Build MQTTnet.Server Windows-x64 +&dotnet publish ..\Source\MQTTnet.Server\MQTTnet.Server.csproj --configuration Release --self-contained --runtime win-x64 + +$source = "..\Source\MQTTnet.Server\bin\Release\netcoreapp2.2\win-x64\publish" +$destination = "..\Source\MQTTnet.Server\bin\MQTTnet.Server-Windows-x64-v$nugetVersion.zip" +If(Test-path $destination) {Remove-item $destination} + Add-Type -assembly "system.io.compression.filesystem" +[io.compression.zipfile]::CreateFromDirectory($source, $destination) + +#################################################################### + # Create NuGet packages. Remove-Item .\NuGet -Force -Recurse -ErrorAction SilentlyContinue diff --git a/Source/MQTTnet.Server/MQTTnet.Server.csproj b/Source/MQTTnet.Server/MQTTnet.Server.csproj index c322548..4a1e21c 100644 --- a/Source/MQTTnet.Server/MQTTnet.Server.csproj +++ b/Source/MQTTnet.Server/MQTTnet.Server.csproj @@ -68,6 +68,7 @@ + diff --git a/Source/MQTTnet.Server/Properties/PublishProfiles/FolderProfile.pubxml b/Source/MQTTnet.Server/Properties/PublishProfiles/FolderProfile.pubxml deleted file mode 100644 index 5b90447..0000000 --- a/Source/MQTTnet.Server/Properties/PublishProfiles/FolderProfile.pubxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - FileSystem - FileSystem - Release - Any CPU - - False - False - 5699fb8c-838c-4ab0-80a5-9ca809f9b65b - bin\publish\ - True - - \ No newline at end of file diff --git a/Source/MQTTnet.Server/Properties/PublishProfiles/Linux_x64.pubxml b/Source/MQTTnet.Server/Properties/PublishProfiles/Linux_x64.pubxml deleted file mode 100644 index a3b0f6f..0000000 --- a/Source/MQTTnet.Server/Properties/PublishProfiles/Linux_x64.pubxml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - FileSystem - FileSystem - Release - x64 - - False - False - 5699fb8c-838c-4ab0-80a5-9ca809f9b65b - bin\linux_x64 - True - netcoreapp2.2 - linux-x64 - true - <_IsPortable>false - - \ No newline at end of file