Add shell script to build all UP versions

This commit is contained in:
jvyden 2022-07-28 17:06:56 -04:00
parent 159dd9f3cc
commit fea80d4485
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
4 changed files with 35 additions and 0 deletions

2
.gitignore vendored
View file

@ -396,3 +396,5 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
builds/

View file

@ -9,6 +9,7 @@
<Path>README.md</Path>
<Path>UnionPatcher.sln.DotSettings</Path>
<Path>UnionPatcher.sln.DotSettings.user</Path>
<Path>build-all.sh</Path>
<Path>global.json</Path>
</explicitIncludes>
<explicitExcludes />

View file

@ -20,5 +20,6 @@
<ItemGroup>
<KnownFrameworkReference Update="Microsoft.WindowsDesktop.App.WindowsForms" IsWindowsOnly="false" />
<KnownFrameworkReference Update="Microsoft.WindowsDesktop.App" IsWindowsOnly="false"/>
</ItemGroup>
</Project>

31
build-all.sh Executable file
View file

@ -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/"