Created
February 25, 2019 18:35
-
-
Save dam5s/62cb988c3a5e5f9bc3c4ec66eb7fb07b to your computer and use it in GitHub Desktop.
How to publish a .NET Core CLI as a single binary for all 3 platforms from a single OS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -v | |
dotnet publish -c release -r linux-x64 | |
warp-packer --arch linux-x64 --input_dir cli-app/bin/Release/netcoreapp2.2/linux-x64/publish --exec cli-app --output cli-app/bin/Release/netcoreapp2.2/cli-app-linux | |
dotnet publish -c release -r osx-x64 | |
warp-packer --arch macos-x64 --input_dir cli-app/bin/Release/netcoreapp2.2/osx-x64/publish --exec cli-app --output cli-app/bin/Release/netcoreapp2.2/cli-app-osx | |
dotnet publish -c release -r win-x64 | |
warp-packer --arch windows-x64 --input_dir cli-app/bin/Release/netcoreapp2.2/win-x64/publish --exec cli-app.exe --output cli-app/bin/Release/netcoreapp2.2/cli-app-win.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
warp-packer
comes from the Warp project: https://github.com/dgiagio/warp