File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1414 options :
1515 - Windows (x86_64)
1616 - Linux (x86_64)
17+ patch-server-port :
18+ description : ' Patch server port (useful for resolving port conflicts)"'
19+ required : true
20+ default : ' 5678'
1721
1822env :
1923 OS_ARCH : ${{ github.event.inputs.os-and-arch }}
2024 VERSION_TO_PATCH : ${{ github.event.inputs.version_to_patch }}
25+ PATCH_SERVER_PORT : ${{ github.event.inputs.patch-server-port }}
2126
2227jobs :
2328
@@ -462,6 +467,19 @@ jobs:
462467 }
463468 shell : pwsh
464469
470+ - name : Set patch server port (in main.js of server)
471+ run : |
472+ $source_index = "msojocs-patch/server/index.js"
473+ $index_content = Get-Content -Path $source_index -Raw
474+
475+ if (Test-Path $source_index) {
476+ $index_content = $index_content -replace 'const port = \d+;', "const port = $env:PATCH_SERVER_PORT;"
477+ Set-Content -Path $source_index -Value $index_content
478+ Write-Host "Server port set to $env:PATCH_SERVER_PORT"
479+ } else {
480+ Write-Host "index.js (from server) not found"
481+ }
482+
465483 - name : Patch main.js to main.original.js
466484 run : |
467485 $source_main = "FE/resources/app/out/main.js"
You can’t perform that action at this time.
0 commit comments