add git pull

main
floxx2112 2 years ago
parent d7ec22a6b2
commit 294ea81efd
  1. 24
      AssistBDD.ps1

@ -1,12 +1,22 @@
$backendPath = $PSScriptRoot + "\AssistDB_V2_Back" $backendPath = $PSScriptRoot + "\..\AssistDB_V2_Back"
$frontendPath = $PSScriptRoot + "\AssistDB_V2_Front" $frontendPath = $PSScriptRoot + "\..\AssistDB_V2_Front"
Start-Job -Name Backend -Args $backendPath { param($backendPath) Set-Location $backendPath; mvn spring-boot:run } 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; ng serve } }
Start-Job -Name Frontend -Args $frontendPath{ param($frontendPath) Set-Location $frontendPath; git pull; ng serve }
Start-Process "http://localhost:4200/" Start-Process "http://localhost:4200/"
$text = 'Tapez "stop" pour stopper les applications' $text = 'Tapez "stop" pour stopper les applications ou "log" pour afficher les logs: '
$FromInput = Read-Host $text $continue=1
while ($FromInput -ne 'stop') { while ($continue -eq 1){
$FromInput = Read-Host $text $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'){ if($FromInput -eq 'stop'){
Get-Job -Name Backend | Stop-Job Get-Job -Name Backend | Stop-Job

Loading…
Cancel
Save