refactor(updater): removed v1 from restarting

This commit is contained in:
2025-04-18 16:25:26 -05:00
parent 2ffc3cc242
commit 8c5c9fd244

View File

@@ -119,29 +119,29 @@ $plantFunness = {
exit 1 # Exit with a non-zero code if there's an error exit 1 # Exit with a non-zero code if there's an error
} }
Write-Host "-----------------------Dealing with LSTv1 Stuff ------------------------------------" # Write-Host "-----------------------Dealing with LSTv1 Stuff ------------------------------------"
try { # try {
# Expand the archive # # Expand the archive
Expand-Archive -Path "$($localPath)\$($obsBuild)" -DestinationPath $obslst -Force # Expand-Archive -Path "$($localPath)\$($obsBuild)" -DestinationPath $obslst -Force
# Delete the zip file after extraction # # Delete the zip file after extraction
Write-Host "Deleting the zip file..." # Write-Host "Deleting the zip file..."
Remove-Item -Path "$($localPath)\$($obsBuild)" -Force # Remove-Item -Path "$($localPath)\$($obsBuild)" -Force
} catch { # } catch {
Write-Host "Error: $_" # Write-Host "Error: $_"
exit 1 # Exit with a non-zero code if there's an error # exit 1 # Exit with a non-zero code if there's an error
} # }
# for iowa 2 need to change the port config on the start up of nextjs server # # for iowa 2 need to change the port config on the start up of nextjs server
if($token -eq "usiow2"){ # if($token -eq "usiow2"){
$jsonPkgloc = "$($obslst)\apps\frontend\package.json" # $jsonPkgloc = "$($obslst)\apps\frontend\package.json"
#read the file # #read the file
$jsonContent = Get-Content -Path $jsonPkgloc | ConvertFrom-Json # $jsonContent = Get-Content -Path $jsonPkgloc | ConvertFrom-Json
#change the second we want to update # #change the second we want to update
$jsonContent.scripts.start = "next start -p 3001" # $jsonContent.scripts.start = "next start -p 3001"
# convert back to json # # convert back to json
$jsonContent | ConvertTo-Json | Set-Content -Path $jsonPkgloc # $jsonContent | ConvertTo-Json | Set-Content -Path $jsonPkgloc
} # }
############################################################################ ############################################################################
Write-Host "Stopping the services to do the updates, pkgs and db changes." Write-Host "Stopping the services to do the updates, pkgs and db changes."
@@ -426,15 +426,15 @@ try {
# Write-Host "Starting $($serviceGateway)" # Write-Host "Starting $($serviceGateway)"
# Start-Service -DisplayName $serviceGateway # Start-Service -DisplayName $serviceGateway
# Start-Sleep -Seconds 1 # Start-Sleep -Seconds 1
#Write-Host "Starting $($serviceAuth)" # Write-Host "Starting $($serviceAuth)"
#Start-Service -DisplayName $serviceAuth # Start-Service -DisplayName $serviceAuth
#Start-Sleep -Seconds 1 # Start-Sleep -Seconds 1
Write-Host "Starting $($serviceApp)" # Write-Host "Starting $($serviceApp)"
Start-Service -DisplayName $serviceApp # Start-Service -DisplayName $serviceApp
Start-Sleep -Seconds 1 # Start-Sleep -Seconds 1
Write-Host "Starting $($serviceFrontEnd)" # Write-Host "Starting $($serviceFrontEnd)"
Start-Service -DisplayName $serviceFrontEnd # Start-Service -DisplayName $serviceFrontEnd
Start-Sleep -Seconds 1 # Start-Sleep -Seconds 1
Write-Host "Starting $( $serviceLstV2)" Write-Host "Starting $( $serviceLstV2)"
Start-Service -DisplayName $serviceLstV2 Start-Service -DisplayName $serviceLstV2
Start-Sleep -Seconds 1 Start-Sleep -Seconds 1