mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-12 15:10:45 -05:00
Fixed Launcher Build Script
The launcher, modules, and server projects are now compiling. TODO: - Combine project builds into output directory - Compress output directory - Upload release to public folder - Adapt to work within Drone env - Adapt build script to work with a dynamic tag value - Only run project builds when the tag exists in all three projects
This commit is contained in:
parent
9ba230f190
commit
e6e5f012c4
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
Launcher/
|
||||
Modules/
|
||||
Server/
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -1,5 +0,0 @@
|
||||
{
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": null
|
||||
}
|
||||
}
|
@ -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 ⚡"
|
||||
|
@ -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: $_"
|
||||
|
Loading…
x
Reference in New Issue
Block a user