From fea80d4485257779f5b75c52407a31f9f5c351b0 Mon Sep 17 00:00:00 2001 From: jvyden Date: Thu, 28 Jul 2022 17:06:56 -0400 Subject: [PATCH] Add shell script to build all UP versions --- .gitignore | 2 ++ .../.idea.UnionPatcher/.idea/indexLayout.xml | 1 + .../UnionPatcher.Gui.Windows.csproj | 1 + build-all.sh | 31 +++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100755 build-all.sh diff --git a/.gitignore b/.gitignore index 426d76d..ff31438 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,5 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml + +builds/ diff --git a/.idea/.idea.UnionPatcher/.idea/indexLayout.xml b/.idea/.idea.UnionPatcher/.idea/indexLayout.xml index c633a30..8b96167 100644 --- a/.idea/.idea.UnionPatcher/.idea/indexLayout.xml +++ b/.idea/.idea.UnionPatcher/.idea/indexLayout.xml @@ -9,6 +9,7 @@ README.md UnionPatcher.sln.DotSettings UnionPatcher.sln.DotSettings.user + build-all.sh global.json diff --git a/UnionPatcher.Gui.Windows/UnionPatcher.Gui.Windows.csproj b/UnionPatcher.Gui.Windows/UnionPatcher.Gui.Windows.csproj index bef709d..f754306 100644 --- a/UnionPatcher.Gui.Windows/UnionPatcher.Gui.Windows.csproj +++ b/UnionPatcher.Gui.Windows/UnionPatcher.Gui.Windows.csproj @@ -20,5 +20,6 @@ + diff --git a/build-all.sh b/build-all.sh new file mode 100755 index 0000000..0bd01b9 --- /dev/null +++ b/build-all.sh @@ -0,0 +1,31 @@ +mkdir -p builds; +#dotnet clean; + +dotnet publish -c Windows -r win-x64 --self-contained + +dotnet publish -c Linux -r linux-x64 --self-contained +dotnet publish -c Linux -r linux-arm --self-contained +dotnet publish -c Linux -r linux-arm64 --self-contained + +dotnet publish -c MacOS -r osx-x64 --self-contained +dotnet publish -c MacOS -r osx-arm64 --self-contained + +# $1: Name.zip +# $2: Path to zip +function zipPath() { + currentDirectory=$(pwd) + cd $2 || return 1; + + zip "$1" *; + cd $currentDirectory || return 1; + mv "$2/$1" builds/ +} + +zipPath "UnionPatcher-Windows-x64.zip" "UnionPatcher.Gui.Windows/bin/Release/net6.0-windows/win-x64/publish/" + +zipPath "UnionPatcher-Linux-x64.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-x64/publish/" +zipPath "UnionPatcher-Linux-arm.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-arm/publish/" +zipPath "UnionPatcher-Linux-arm64.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-arm64/publish/" + +zipPath "UnionPatcher-macOS-x64.zip" "UnionPatcher.Gui.MacOS/bin/Release/net6.0/osx-x64/publish/" +zipPath "UnionPatcher-macOS-arm64.zip" "UnionPatcher.Gui.MacOS/bin/Release/net6.0/osx-arm64/publish/" \ No newline at end of file