From 294ea81efded03be26b668717102a638d605be18 Mon Sep 17 00:00:00 2001 From: floxx2112 Date: Thu, 16 Mar 2023 09:39:33 +0100 Subject: [PATCH] add git pull --- AssistBDD.ps1 | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/AssistBDD.ps1 b/AssistBDD.ps1 index ef0bf2b..2cfd154 100644 --- a/AssistBDD.ps1 +++ b/AssistBDD.ps1 @@ -1,13 +1,23 @@ -$backendPath = $PSScriptRoot + "\AssistDB_V2_Back" -$frontendPath = $PSScriptRoot + "\AssistDB_V2_Front" -Start-Job -Name Backend -Args $backendPath { param($backendPath) Set-Location $backendPath; mvn spring-boot:run } -Start-Job -Name Frontend -Args $frontendPath{ param($frontendPath) Set-Location $frontendPath; ng serve } +$backendPath = $PSScriptRoot + "\..\AssistDB_V2_Back" +$frontendPath = $PSScriptRoot + "\..\AssistDB_V2_Front" +Start-Job -Name Backend -Args $backendPath { param($backendPath) Set-Location $backendPath; git pull; mvn spring-boot:run +} +Start-Job -Name Frontend -Args $frontendPath{ param($frontendPath) Set-Location $frontendPath; git pull; ng serve } Start-Process "http://localhost:4200/" -$text = 'Tapez "stop" pour stopper les applications' -$FromInput = Read-Host $text -while ($FromInput -ne 'stop') { +$text = 'Tapez "stop" pour stopper les applications ou "log" pour afficher les logs: ' +$continue=1 +while ($continue -eq 1){ $FromInput = Read-Host $text -} + if ( $FromInput -like 'stop' ) { + $continue=0; + } + elseif ( $FromInput -like 'log' ) { + Write-Host "### - Back : " + Get-Job -Name Backend | Receive-Job + Write-Host "### - Front : " + Get-Job -Name Frontend | Receive-Job + } +} if($FromInput -eq 'stop'){ Get-Job -Name Backend | Stop-Job Get-Job -Name Backend | Remove-Job