0
0
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:
Refringe 2024-02-23 23:01:58 -05:00
parent 9ba230f190
commit e6e5f012c4
No known key found for this signature in database
GPG Key ID: 64E03E5F892C6F9E
5 changed files with 39 additions and 21 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
Launcher/
Modules/
Server/

View File

@ -1,5 +0,0 @@
{
"[markdown]": {
"editor.defaultFormatter": null
}
}

View File

@ -1,12 +1,12 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"[markdown]": {
"editor.defaultFormatter": null
}
}
"folders": [
{
"path": "."
}
],
"settings": {
"[markdown]": {
"editor.defaultFormatter": null
}
}
}

View File

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

View File

@ -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: $_"