Skip to content

Commit

Permalink
Fix powershell string formatting bug (#4004)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan-Jowett and Alan Jowett authored Nov 12, 2024
1 parent e7cae1d commit ae6eff0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions scripts/onebranch/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,31 @@ Set-Location $scriptPath\..\..
$OneBranchArch = $env:ONEBRANCH_ARCH
$OneBranchConfig = $env:ONEBRANCH_CONFIG

function FormatBinDir($Config, $Arch) {
$BinDir = "build\bin\$Arch"
$BinDir += "_"
$BinDir += $Config
return $BinDir
}

function CopySignedBinaries {
param (
[string]$Config,
[string]$Arch
)
xcopy /y "build\bin\$Arch\_$Config" ".\$Arch\$Config"
Get-ChildItem -Path "build\bin\$Arch\_$Config" -Recurse | Remove-Item -Force -Recurse
$BinDir = FormatBinDir $Config $Arch
xcopy /y $BinDir ".\$Arch\$Config"
Get-ChildItem -Path $BinDir -Recurse | Remove-Item -Force -Recurse
}

function CopyPackages {
param (
[string]$Config,
[string]$Arch
)
xcopy /y ".\$Arch\$Config\*.nupkg" "build\bin\$Arch\_$Config"
xcopy /y ".\$Arch\$Config\*.msi" "build\bin\$Arch\_$Config"
$BinDir = FormatBinDir $Config $Arch
xcopy /y ".\$Arch\$Config\*.nupkg" $BinDir
xcopy /y ".\$Arch\$Config\*.msi" $BinDir
}

if ($OneBranchConfig -eq "NativeOnlyDebug" -or $OneBranchConfig -eq "NativeOnlyRelease")
Expand Down

0 comments on commit ae6eff0

Please sign in to comment.