File tree Expand file tree Collapse file tree 4 files changed +21
-43
lines changed
tools/azure-sdk-tools/devtools_testutils Expand file tree Collapse file tree 4 files changed +21
-43
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -22,7 +22,17 @@ steps:
2222 pwsh : true
2323
2424 - pwsh : |
25- $version = $(Get-Content "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt" -Raw).Trim()
25+ $standardVersion = "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt"
26+ $overrideVersion = "${{ parameters.templateRoot }}/eng/target_proxy_version.txt"
27+
28+ $version = $(Get-Content $standardVersion -Raw).Trim()
29+
30+ if (Test-Path $overrideVersion) {
31+ $version = $(Get-Content $overrideVersion -Raw).Trim()
32+ }
33+
34+ Write-Host "Installing test-proxy version $version"
35+
2636 dotnet tool install azure.sdk.tools.testproxy `
2737 --tool-path $(Build.BinariesDirectory)/test-proxy `
2838 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
Original file line number Diff line number Diff line change 1+ 1.0.0-dev.20240410.1
Original file line number Diff line number Diff line change 9393def get_target_version (repo_root : str ) -> str :
9494 """Gets the target test-proxy version from the target_version.txt file in /eng/common/testproxy"""
9595 version_file_location = os .path .relpath ("eng/common/testproxy/target_version.txt" )
96+ override_version_file_location = os .path .relpath ("eng/target_proxy_version.txt" )
97+
9698 version_file_location_from_root = os .path .abspath (os .path .join (repo_root , version_file_location ))
99+ override_version_file_location_from_root = os .path .abspath (os .path .join (repo_root , override_version_file_location ))
97100
98- with open (version_file_location_from_root , "r" ) as f :
99- target_version = f .read ().strip ()
101+ if os .path .exists (override_version_file_location_from_root ):
102+ with open (override_version_file_location_from_root , "r" ) as f :
103+ target_version = f .read ().strip ()
104+ else :
105+ with open (version_file_location_from_root , "r" ) as f :
106+ target_version = f .read ().strip ()
100107
101108 return target_version
102109
You can’t perform that action at this time.
0 commit comments