Skip to content

Commit

Permalink
Make zip function recursive when building
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Aug 6, 2022
1 parent 98dd90a commit 8f6ba8b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ dotnet publish -c MacOS -r osx-arm64 --self-contained

# $1: Name.zip
# $2: Path to zip
function zipPath() {
function createBuild() {
currentDirectory=$(pwd)
cd $2 || return 1;

zip "$1" *;
zip -r "$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/"
createBuild "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/"
createBuild "UnionPatcher-Linux-x64.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-x64/publish/"
createBuild "UnionPatcher-Linux-arm.zip" "UnionPatcher.Gui.Linux/bin/Release/net6.0/linux-arm/publish/"
createBuild "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/"
createBuild "UnionPatcher-macOS-x64.zip" "UnionPatcher.Gui.MacOS/bin/Release/net6.0/osx-x64/publish/"
createBuild "UnionPatcher-macOS-arm64.zip" "UnionPatcher.Gui.MacOS/bin/Release/net6.0/osx-arm64/publish/"

0 comments on commit 8f6ba8b

Please sign in to comment.