add reftag commandline argument

This commit is contained in:
2025-04-21 20:50:16 +02:00
parent 70805083ba
commit 01fc5606cb
3 changed files with 17 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
public delegate void CheckingProgressUpdatedEventHandler(int toCheck, int processed);
public ILogger Log { get; set; } = NullLogger.Instance;
public string? OverwriteRefTag { get; set; }
private readonly HttpClient http = new();
private readonly ModpackFactory factory = new();
@@ -32,13 +33,13 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
private async Task<UpdateInfos> DownloadUpdateInfos()
{
var content = await http.GetStringAsync(updateConfig.GetUpdateUrl());
var content = await http.GetStringAsync(updateConfig.GetUpdateUrl(overwriteRefTag: OverwriteRefTag));
return UpdateInfos.Parse(content);
}
private async Task<InstallInfos> DownloadInstallInfos()
{
var content = await http.GetStringAsync(updateConfig.GetInstallUrl());
var content = await http.GetStringAsync(updateConfig.GetInstallUrl(overwriteRefTag: OverwriteRefTag));
return InstallInfos.Parse(content);
}