Skip to content

Commit

Permalink
Add publish profiles for framework-dependent packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster620 committed Nov 3, 2021
1 parent b6a91d1 commit 3454651
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 1 deletion.
36 changes: 35 additions & 1 deletion BuildPackages.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ IF %ERRORLEVEL% NEQ 0 (
PowerShell -NoLogo -Command Compress-Archive -Force -Path .\%APP_NAME%\bin\Release\net5.0\publish\win-x64\* -DestinationPath .\Packages\%APP_NAME%-%1-win-x64.zip
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-win-x64.zip > .\Packages\%APP_NAME%-%1-win-x64.txt

echo .
echo ***** Windows (x64, Framework Dependent) *****
dotnet publish %APP_NAME% -c Release-Windows -p:PublishProfile=win-x64-fx-dependent
IF %ERRORLEVEL% NEQ 0 (
exit
)

PowerShell -NoLogo -Command Compress-Archive -Force -Path .\%APP_NAME%\bin\Release\net5.0\publish\win-x64-fx-dependent\* -DestinationPath .\Packages\%APP_NAME%-%1-win-x64-fx-dependent.zip
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-win-x64-fx-dependent.zip > .\Packages\%APP_NAME%-%1-win-x64-fx-dependent.txt


echo .
echo ***** Linux (x64) *****
dotnet publish %APP_NAME% -c Release -p:PublishProfile=linux-x64
IF %ERRORLEVEL% NEQ 0 (
Expand All @@ -31,11 +43,33 @@ IF %ERRORLEVEL% NEQ 0 (
PowerShell -NoLogo -Command Compress-Archive -Force -Path .\%APP_NAME%\bin\Release\net5.0\publish\linux-x64\* -DestinationPath .\Packages\%APP_NAME%-%1-linux-x64.zip
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-linux-x64.zip > .\Packages\%APP_NAME%-%1-linux-x64.txt

echo .
echo ***** Linux (x64, Framework Dependent) *****
dotnet publish %APP_NAME% -c Release -p:PublishProfile=linux-x64-fx-dependent
IF %ERRORLEVEL% NEQ 0 (
exit
)

PowerShell -NoLogo -Command Compress-Archive -Force -Path .\%APP_NAME%\bin\Release\net5.0\publish\linux-x64-fx-dependent\* -DestinationPath .\Packages\%APP_NAME%-%1-linux-x64-fx-dependent.zip
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-linux-x64-fx-dependent.zip > .\Packages\%APP_NAME%-%1-linux-x64-fx-dependent.txt


echo .
echo ***** OSX (x64) *****
dotnet publish %APP_NAME% -c Release -p:PublishProfile=osx-x64
IF %ERRORLEVEL% NEQ 0 (
exit
)

PowerShell -NoLogo -Command Compress-Archive -Force -Path .\%APP_NAME%\bin\Release\net5.0\publish\osx-x64\* -DestinationPath .\Packages\%APP_NAME%-%1-osx-x64.zip
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-osx-x64.zip > .\Packages\%APP_NAME%-%1-osx-x64.txt
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-osx-x64.zip > .\Packages\%APP_NAME%-%1-osx-x64.txt

echo .
echo ***** OSX (x64, Framework Dependent) *****
dotnet publish %APP_NAME% -c Release -p:PublishProfile=osx-x64-fx-dependent
IF %ERRORLEVEL% NEQ 0 (
exit
)

PowerShell -NoLogo -Command Compress-Archive -Force -Path .\%APP_NAME%\bin\Release\net5.0\publish\osx-x64-fx-dependent\* -DestinationPath .\Packages\%APP_NAME%-%1-osx-x64-fx-dependent.zip
PowerShell -NoLogo -Command Get-FileHash .\Packages\%APP_NAME%-%1-osx-x64-fx-dependent.zip > .\Packages\%APP_NAME%-%1-osx-x64-fx-dependent.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net5.0\publish\linux-x64-fx-dependent</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>False</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
</PropertyGroup>
</Project>
16 changes: 16 additions & 0 deletions PixelViewer/Properties/PublishProfiles/osx-x64-fx-dependent.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net5.0\publish\osx-x64-fx-dependent</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<SelfContained>False</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
</PropertyGroup>
</Project>
16 changes: 16 additions & 0 deletions PixelViewer/Properties/PublishProfiles/win-x64-fx-dependent.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release-Windows</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net5.0\publish\win-x64-fx-dependent</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>False</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
</PropertyGroup>
</Project>

0 comments on commit 3454651

Please sign in to comment.