Skip to content

Commit f0e9d49

Browse files
azure-sdkbillwertscbedd
authored
Sync eng/common directory with azure-sdk-tools for PR 6518 (#21200)
* Bump test proxy version * move proxy transition-scripts folder to onboarding Co-authored-by: Bill Wert <[email protected]> Co-authored-by: Scott Beddall <[email protected]>
1 parent b8af6dd commit f0e9d49

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

eng/common/testproxy/transition-scripts/generate-assets-json.ps1 renamed to eng/common/testproxy/onboarding/generate-assets-json.ps1

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,18 +308,17 @@ Function Invoke-ProxyCommand {
308308
# Get the shorthash directory under PROXY_ASSETS_FOLDER
309309
Function Get-AssetsRoot {
310310
param(
311-
[string] $AssetsJsonFile
311+
[string] $AssetsJsonFile,
312+
[string] $TestProxyExe
312313
)
313314
$repoRoot = Get-Repo-Root
314315
$relPath = [IO.Path]::GetRelativePath($repoRoot, $AssetsJsonFile).Replace("`\", "/")
315316
$assetsJsonDirectory = Split-Path $relPath
316-
$breadcrumbFile = Join-Path $repoRoot ".assets" ".breadcrumb"
317317

318-
$breadcrumbString = Get-Content $breadcrumbFile | Where-Object { $_.StartsWith($relPath) }
319-
$assetRepo = $breadcrumbString.Split(";")[1]
320-
$assetsPrefix = (Get-Content $AssetsJsonFile | Out-String | ConvertFrom-Json).AssetsRepoPrefixPath
318+
[array] $output = & "$TestProxyExe" config locate -a "$relPath" --storage-location="$repoRoot"
319+
$assetsDirectory = $output[-1]
321320

322-
return Join-Path $repoRoot ".assets" $assetRepo $assetsPrefix $assetsJsonDirectory
321+
return Join-Path $assetsDirectory $assetsJsonDirectory
323322
}
324323

325324
Function Move-AssetsFromLangRepo {
@@ -405,7 +404,7 @@ if ($InitialPush) {
405404
$CommandArgs = "restore --assets-json-path $assetsJsonRelPath"
406405
Invoke-ProxyCommand -TestProxyExe $TestProxyExe -CommandArgs $CommandArgs -TargetDirectory $repoRoot
407406

408-
$assetsRoot = (Get-AssetsRoot -AssetsJsonFile $assetsJsonFile)
407+
$assetsRoot = (Get-AssetsRoot -AssetsJsonFile $assetsJsonFile -TestProxyExe $TestProxyExe)
409408
Write-Host "assetsRoot=$assetsRoot"
410409

411410
Move-AssetsFromLangRepo -AssetsRoot $assetsRoot
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-dev.20230706.1
1+
1.0.0-dev.20230728.1

0 commit comments

Comments
 (0)