Merge pull request 'Added build script for easier builds' (#4) from dev into main

Reviewed-on: #4
This commit is contained in:
Toastie (DCS Team) 2024-07-09 22:50:33 -07:00
commit e0c276f8e5

37
build.ps1 Normal file
View file

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