File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-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"
Original file line number Diff line number Diff line change 1111 options :
1212 - Windows (x86_64)
1313 - Linux (x86_64)
14+ patch-server-port :
15+ description : ' Patch server port (useful for resolving port conflicts)"'
16+ required : true
17+ default : ' 5678'
1418
1519env :
1620 OS_ARCH : ${{ github.event.inputs.os-and-arch }}
21+ PATCH_SERVER_PORT : ${{ github.event.inputs.patch-server-port }}
1722
1823jobs :
1924
@@ -439,6 +444,19 @@ jobs:
439444 }
440445 shell : pwsh
441446
447+ - name : Set patch server port (in main.js of server)
448+ run : |
449+ $source_index = "msojocs-patch/server/index.js"
450+ $index_content = Get-Content -Path $source_index -Raw
451+
452+ if (Test-Path $source_index) {
453+ $index_content = $index_content -replace 'const port = \d+;', "const port = $env:PATCH_SERVER_PORT;"
454+ Set-Content -Path $source_index -Value $index_content
455+ Write-Host "Server port set to $env:PATCH_SERVER_PORT"
456+ } else {
457+ Write-Host "index.js (from server) not found"
458+ }
459+
442460 - name : Patch main.js to main.original.js
443461 run : |
444462 $source_main = "FE/resources/app/out/main.js"
You can’t perform that action at this time.
0 commit comments