Skip to content

Commit 3b198e9

Browse files
authored
Submit pr #6091 directly to windowsdesktop (#1077)
1 parent 1be5738 commit 3b198e9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

eng/common/post-build/publish-using-darc.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ param(
1616
try {
1717
. $PSScriptRoot\post-build-utils.ps1
1818
# Hard coding darc version till the next arcade-services roll out, cos this version has required API changes for darc add-build-to-channel
19-
. $PSScriptRoot\..\darc-init.ps1 -darcVersion "1.1.0-beta.20418.1"
19+
$darc = Get-Darc "1.1.0-beta.20418.1"
2020

2121
$optionalParams = [System.Collections.ArrayList]::new()
2222

@@ -50,7 +50,7 @@ try {
5050
}
5151
}
5252

53-
& darc add-build-to-channel `
53+
& $darc add-build-to-channel `
5454
--id $buildId `
5555
--publishing-infra-version $PublishingInfraVersion `
5656
--default-channels `

eng/common/tools.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,16 @@ function IsWindowsPlatform() {
716716
return [environment]::OSVersion.Platform -eq [PlatformID]::Win32NT
717717
}
718718

719+
function Get-Darc($version) {
720+
$darcPath = "$TempDir\darc\$(New-Guid)"
721+
if ($version -ne $null) {
722+
& $PSScriptRoot\darc-init.ps1 -toolpath $darcPath -darcVersion $version | Out-Host
723+
} else {
724+
& $PSScriptRoot\darc-init.ps1 -toolpath $darcPath | Out-Host
725+
}
726+
return "$darcPath\darc.exe"
727+
}
728+
719729
. $PSScriptRoot\pipeline-logging-functions.ps1
720730

721731
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')

0 commit comments

Comments
 (0)