Skip to content
Snippets Groups Projects
Commit fe3021b3 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Update service binaries update location to recent changes.

Refers to #13
parent 0faec6e8
No related branches found
No related tags found
No related merge requests found
......@@ -205,8 +205,14 @@ function Update-Configuration {
function Copy-ServiceFiles {
try {
Write-Verbose "Looking for source package using pattern: $($Pattern)"
$PkgDir = Get-ChildItem -Path $UpdateBinariesPath -Directory -Name |
Where-Object {$_ -match $Pattern} |
Sort-Object |
Select-Object -Last 1
Write-Verbose "Update source package: $($PkgDir)"
Copy-Item -Recurse -Force -ErrorAction Stop `
-Path "$($UpdateBinariesPath)\$($ServiceName)\*" `
-Path "$($UpdateBinariesPath)\$($PkgDir)\$($ServiceName)\*" `
-Destination "$InstallationPath"
}
catch {
......@@ -307,7 +313,7 @@ Check-ServiceState $ServiceName
$UpdateConfigPath = "$($UpdateSourcePath)\Configs\$($env:COMPUTERNAME)"
$UpdateMarkerPath = "$($UpdateSourcePath)\Service\UpdateMarkers"
$UpdateBinariesPath = "$($UpdateSourcePath)\Service\Binaries\Latest"
$UpdateBinariesPath = "$($UpdateSourcePath)\Service\Binaries"
Exit-IfDirMissing $InstallationPath "installation"
Exit-IfDirMissing $UpdateSourcePath "update source"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment