Skip to content

Commit

Permalink
Revise publishing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitSith2 committed Dec 11, 2020
1 parent 153ee28 commit a6b3465
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
24 changes: 21 additions & 3 deletions EnemizerCLI.Core/publish - debug.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
@echo off
setlocal
PATH="C:\Program Files\7-Zip";%PATH%
set MSBUILDSINGLELOADCONTEXT=1
dotnet publish --framework netcoreapp2.0 -c Debug --self-contained --runtime win-x64
dotnet publish --framework netcoreapp2.0 -c Debug --self-contained --runtime osx.10.12-x64
dotnet publish --framework netcoreapp2.0 -c Debug --self-contained --runtime ubuntu.16.04-x64

set FRAMEWORK=netcoreapp3.1
set RELEASEBUILD=Debug

set WINDOWSVERSION=win-x64
set MACVERSION=osx.10.12-x64
set LINUXVERSION=ubuntu.16.04-x64

dotnet publish --framework %FRAMEWORK% -c %RELEASEBUILD% --self-contained --runtime %WINDOWSVERSION% -p:PublishTrimmed=true
dotnet publish --framework %FRAMEWORK% -c %RELEASEBUILD% --self-contained --runtime %MACVERSION% -p:PublishTrimmed=true
dotnet publish --framework %FRAMEWORK% -c %RELEASEBUILD% --self-contained --runtime %LINUXVERSION% -p:PublishTrimmed=true

7z a .\bin\%RELEASEBUILD%\%WINDOWSVERSION%.7z .\bin\%RELEASEBUILD%\%FRAMEWORK%\%WINDOWSVERSION%\publish\*
7z a .\bin\%RELEASEBUILD%\%MACVERSION%.7z .\bin\%RELEASEBUILD%\%FRAMEWORK%\%MACVERSION%\publish\*
7z a .\bin\%RELEASEBUILD%\%LINUXVERSION%.7z .\bin\%RELEASEBUILD%\%FRAMEWORK%\%LINUXVERSION%\publish\*
7z a -tzip .\bin\%RELEASEBUILD%\%WINDOWSVERSION%.zip .\bin\%RELEASEBUILD%\%FRAMEWORK%\%WINDOWSVERSION%\publish\*
7z a -tzip .\bin\%RELEASEBUILD%\%MACVERSION%.zip .\bin\%RELEASEBUILD%\%FRAMEWORK%\%MACVERSION%\publish\*
7z a -tzip .\bin\%RELEASEBUILD%\%LINUXVERSION%.zip .\bin\%RELEASEBUILD%\%FRAMEWORK%\%LINUXVERSION%\publish\*

pause
endlocal
24 changes: 21 additions & 3 deletions EnemizerCLI.Core/publish.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
@echo off
setlocal
PATH="C:\Program Files\7-Zip";%PATH%
set MSBUILDSINGLELOADCONTEXT=1
dotnet publish --framework netcoreapp2.0 -c Release --self-contained --runtime win-x64 -p:PublishTrimmed=true
dotnet publish --framework netcoreapp2.0 -c Release --self-contained --runtime osx.10.12-x64 -p:PublishTrimmed=true
dotnet publish --framework netcoreapp2.0 -c Release --self-contained --runtime ubuntu.16.04-x64 -p:PublishTrimmed=true

set FRAMEWORK=netcoreapp3.1
set RELEASEBUILD=Release

set WINDOWSVERSION=win-x64
set MACVERSION=osx.10.12-x64
set LINUXVERSION=ubuntu.16.04-x64

dotnet publish --framework %FRAMEWORK% -c %RELEASEBUILD% --self-contained --runtime %WINDOWSVERSION% -p:PublishTrimmed=true
dotnet publish --framework %FRAMEWORK% -c %RELEASEBUILD% --self-contained --runtime %MACVERSION% -p:PublishTrimmed=true
dotnet publish --framework %FRAMEWORK% -c %RELEASEBUILD% --self-contained --runtime %LINUXVERSION% -p:PublishTrimmed=true

7z a .\bin\%RELEASEBUILD%\%WINDOWSVERSION%.7z .\bin\%RELEASEBUILD%\%FRAMEWORK%\%WINDOWSVERSION%\publish\*
7z a .\bin\%RELEASEBUILD%\%MACVERSION%.7z .\bin\%RELEASEBUILD%\%FRAMEWORK%\%MACVERSION%\publish\*
7z a .\bin\%RELEASEBUILD%\%LINUXVERSION%.7z .\bin\%RELEASEBUILD%\%FRAMEWORK%\%LINUXVERSION%\publish\*
7z a -tzip .\bin\%RELEASEBUILD%\%WINDOWSVERSION%.zip .\bin\%RELEASEBUILD%\%FRAMEWORK%\%WINDOWSVERSION%\publish\*
7z a -tzip .\bin\%RELEASEBUILD%\%MACVERSION%.zip .\bin\%RELEASEBUILD%\%FRAMEWORK%\%MACVERSION%\publish\*
7z a -tzip .\bin\%RELEASEBUILD%\%LINUXVERSION%.zip .\bin\%RELEASEBUILD%\%FRAMEWORK%\%LINUXVERSION%\publish\*

pause
endlocal

0 comments on commit a6b3465

Please sign in to comment.