Skip to content

Commit 12ae3a0

Browse files
committed
Improve config matching for non-default regions
1 parent 598aae8 commit 12ae3a0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

TACTTool/Program.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,23 @@ private static async Task CommandLineArgHandler(ParseResult result)
298298
build.Settings.BuildConfig ??= splitLine[1];
299299
build.Settings.CDNConfig ??= splitLine[2];
300300
}
301+
302+
// If we have a build config but no cdn config, take the first available cdn config with that build config
303+
if (!string.IsNullOrEmpty(build.Settings.BuildConfig) && build.Settings.CDNConfig == null)
304+
{
305+
foreach (var line in versions.Split('\n'))
306+
{
307+
if (line.StartsWith('#'))
308+
continue;
309+
310+
var splitLine = line.Split('|');
311+
if (splitLine[1] == build.Settings.BuildConfig)
312+
{
313+
build.Settings.CDNConfig = splitLine[2];
314+
break;
315+
}
316+
}
317+
}
301318
}
302319
}
303320

0 commit comments

Comments
 (0)