diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0944e11 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Launcher/ +Modules/ +Server/ diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index d55f9be..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "[markdown]": { - "editor.defaultFormatter": null - } -} diff --git a/build.code-workspace b/build.code-workspace index 366c758..a38bbd3 100644 --- a/build.code-workspace +++ b/build.code-workspace @@ -1,12 +1,12 @@ { - "folders": [ - { - "path": "." - } - ], - "settings": { - "[markdown]": { - "editor.defaultFormatter": null - } - } + "folders": [ + { + "path": "." + } + ], + "settings": { + "[markdown]": { + "editor.defaultFormatter": null + } + } } diff --git a/project/build_launcher.ps1 b/project/build_launcher.ps1 index be9582d..8a55759 100644 --- a/project/build_launcher.ps1 +++ b/project/build_launcher.ps1 @@ -54,9 +54,29 @@ New-Item -Path $DIR_BUILD -ItemType Directory -Force Set-Location $DIR_PROJECT Write-Output " » Installing .NET Dependencies" -dotnet restore +try { + $RESTORE_RESULT = dotnet restore + if ($LASTEXITCODE -ne 0) { + throw "dotnet restore failed with exit code $LASTEXITCODE" + } + Write-Output $RESTORE_RESULT +} +catch { + Write-Error " » FAIL: Error executing dotnet restore: $_" + exit 1 # Fail the build +} Write-Output " » Running Build Task" -dotnet build +try { + $BUILD_RESULT = dotnet publish "$DIR_PROJECT\Aki.Launcher\Aki.Launcher.csproj" -c Release -f net6.0 -r win-x64 /p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true --self-contained false + if ($LASTEXITCODE -ne 0) { + throw "dotnet publish failed with exit code $LASTEXITCODE" + } + Write-Output $BUILD_RESULT +} +catch { + Write-Error " » FAIL: Error executing dotnet restore: $_" + exit 1 # Fail the build +} Write-Output "⚡ Launcher Built ⚡" diff --git a/project/build_modules.ps1 b/project/build_modules.ps1 index 123fbb9..e30e621 100644 --- a/project/build_modules.ps1 +++ b/project/build_modules.ps1 @@ -121,11 +121,11 @@ Set-Location $DIR_PROJECT Write-Output " » Installing .NET Dependencies" try { - $restoreResult = dotnet restore + $RESTORE_RESULT = dotnet restore if ($LASTEXITCODE -ne 0) { throw "dotnet restore failed with exit code $LASTEXITCODE" } - Write-Output $restoreResult + Write-Output $RESTORE_RESULT } catch { Write-Error " » FAIL: Error executing dotnet restore: $_" @@ -134,11 +134,11 @@ catch { Write-Output " » Running Build Task" try { - $buildResult = dotnet build + $BUILD_RESULT = dotnet build if ($LASTEXITCODE -ne 0) { throw "dotnet build failed with exit code $LASTEXITCODE" } - Write-Output $buildResult + Write-Output $BUILD_RESULT } catch { Write-Error " » FAIL: Error executing dotnet build: $_"