File tree Expand file tree Collapse file tree
common/tools/dev-tool/src/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -287,8 +287,7 @@ export async function isProxyToolActive(): Promise<boolean> {
287287 }
288288
289289 log . info (
290- `Proxy tool seems to be active at http://localhost:${
291- process . env . TEST_PROXY_HTTP_PORT ?? 5000
290+ `Proxy tool seems to be active at http://localhost:${ process . env . TEST_PROXY_HTTP_PORT ?? 5000
292291 } \n`,
293292 ) ;
294293 return true ;
@@ -299,15 +298,30 @@ export async function isProxyToolActive(): Promise<boolean> {
299298
300299async function getTargetVersion ( ) {
301300 // Grab the tag from the `/eng/common/testproxy/target_version.txt` file [..is used to control the default version]
301+ //
302+ // In times of longer lived version override, the file eng/target_proxy_version.txt can be used to override this version
303+ // in both CI and local development.
302304 // Example content:
303305 //
304306 // 1.0.0-dev.20220224.2
305307 // (Bot regularly updates the tag in the file above.)
306308 try {
307- const contentInVersionFile = await fs . readFile (
308- `${ path . join ( await resolveRoot ( ) , "eng/common/testproxy/target_version.txt" ) } ` ,
309- "utf-8" ,
310- ) ;
309+ let contentInVersionFile : string ;
310+ const overrideFile = `${ path . join ( await resolveRoot ( ) , "eng/target_proxy_version.txt" ) } ` ;
311+ const overrideExists = await fs . exists ( overrideFile ) ;
312+
313+ if ( overrideExists ) {
314+ contentInVersionFile = await fs . readFile (
315+ overrideFile ,
316+ "utf-8" ,
317+ ) ;
318+ }
319+ else {
320+ contentInVersionFile = await fs . readFile (
321+ `${ path . join ( await resolveRoot ( ) , "eng/common/testproxy/target_version.txt" ) } ` ,
322+ "utf-8" ,
323+ ) ;
324+ }
311325
312326 const tag = contentInVersionFile . trim ( ) ;
313327
Original file line number Diff line number Diff line change 1+ 1.0.0-dev.20240410.1
You can’t perform that action at this time.
0 commit comments