From 7427592de9186975bee4130bf414105fc727aede Mon Sep 17 00:00:00 2001 From: Toastie Date: Wed, 10 Jul 2024 17:49:25 +1200 Subject: [PATCH] Added build script for easier builds --- build.ps1 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 build.ps1 diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..d318992 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,37 @@ +echo "Building EllieHub" +echo "" + +dotnet build -c Release + +echo "Testing EllieHub" +echo "" + +dotnet test + +echo "Publishing EllieHub" +echo "" + +cd .\EllieHub\ +dotnet publish -c Release -r win-x64 -o ../build/EllieHub_win-x64 --self-contained +dotnet publish -c Release -r win-arm64 -o ../build/EllieHub_win-arm64 --self-contained +dotnet publish -c Release -r linux-x64 -o ../build/EllieHub_linux-x64 --self-contained +dotnet publish -c Release -r linux-arm64 -o ../build/EllieHub_linux-arm64 --self-contained +dotnet publish -c Release -r osx-x64 -o ../build/EllieHub_osx-x64 --self-contained +dotnet publish -c Release -r osx-arm64 -o ../build/EllieHub_osx-arm64 --self-contained +cd ..\ + +echo "Packaging EllieHub" +echo "" + +New-Item -ItemType Directory -Path zips\ +Compress-Archive -Path "build\EllieHub_win-x64" -DestinationPath "zips\EllieHub_win-x64.zip" +Compress-Archive -Path "build\EllieHub_win-arm64" -DestinationPath "zips\EllieHub_win-arm64.zip" +Compress-Archive -Path "build\EllieHub_linux-x64" -DestinationPath "zips\EllieHub_linux-x64.zip" +Compress-Archive -Path "build\EllieHub_linux-arm64" -DestinationPath "zips\EllieHub_linux-arm64.zip" +Compress-Archive -Path "build\EllieHub_osx-x64" -DestinationPath "zips\EllieHub_osx-x64.zip" +Compress-Archive -Path "build\EllieHub_osx-arm64" -DestinationPath "zips\EllieHub_osx-arm64.zip" + +echo "" +echo "" +echo "Finished building and packaging EllieHub" +echo "For completed zip builds check the zips folder" \ No newline at end of file