diff options
Diffstat (limited to 'beepzone-helper.ps1')
| -rw-r--r-- | beepzone-helper.ps1 | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/beepzone-helper.ps1 b/beepzone-helper.ps1 index 1b8e47c..fd74800 100644 --- a/beepzone-helper.ps1 +++ b/beepzone-helper.ps1 @@ -750,6 +750,46 @@ function Setup-SeckelAPI { Read-Host "`nPress Enter to continue" } +function Update-FromGitMasters { + $seckelapiSources = Join-Path $WORK_DIR "backend\seckelapi\sources" + $clientSources = Join-Path $WORK_DIR "frontend\desktop-client\sources" + + $confirm = Read-Host "`nThis will run 'git pull' in both backend and frontend source directories. Continue? (y/n)" + if ($confirm -ne 'y') { return } + + Write-Host "`nUpdating sources from git masters..." -ForegroundColor Yellow + + # Update SeckelAPI + if (Test-Path (Join-Path $seckelapiSources ".git")) { + Write-Host "Updating SeckelAPI..." -ForegroundColor Cyan + Push-Location $seckelapiSources + try { + git pull + } catch { + Write-Host "Failed to update SeckelAPI: $_" -ForegroundColor Red + } + Pop-Location + } else { + Write-Host "SeckelAPI sources not found or not a git repository. Skipping." -ForegroundColor DarkGray + } + + # Update Desktop Client + if (Test-Path (Join-Path $clientSources ".git")) { + Write-Host "`nUpdating Desktop Client..." -ForegroundColor Cyan + Push-Location $clientSources + try { + git pull + } catch { + Write-Host "Failed to update Desktop Client: $_" -ForegroundColor Red + } + Pop-Location + } else { + Write-Host "Desktop Client sources not found or not a git repository. Skipping." -ForegroundColor DarkGray + } + + Read-Host "`nPress Enter to continue" +} + function Clean-Sources { Write-Host "`n=== Clean Sources ==="-ForegroundColor Cyan Write-Host "This will delete all sources directories including hidden files." -ForegroundColor Yellow @@ -866,6 +906,7 @@ while ($true) { "Manage users & roles", "Configure & setup SeckelAPI", "Build desktop client", + "Update from git masters", "Clean sources", "Quit" ) @@ -876,7 +917,8 @@ while ($true) { 3 { Manage-Users } 4 { Setup-SeckelAPI } 5 { Build-DesktopClient } - 6 { Clean-Sources } - 7 { exit 0 } + 6 { Update-FromGitMasters } + 7 { Clean-Sources } + 8 { exit 0 } } } |
