support first placeholder & overwriting version
This commit is contained in:
@@ -146,7 +146,8 @@ public partial class Form1
|
||||
{
|
||||
var updater = new ModpackInstaller(updateConfig, modpackInfo)
|
||||
{
|
||||
OverwriteRefTag = Program.Options.RefTag
|
||||
OverwriteRefTag = Program.Options.RefTag,
|
||||
OverwriteVersion = Program.Options.Version,
|
||||
};
|
||||
updater.InstallProgessUpdated += Update_InstallProgessUpdated;
|
||||
updater.CheckingProgressUpdated += Updated_CheckingProgresssUpdated;
|
||||
|
||||
@@ -12,6 +12,7 @@ internal class Options
|
||||
public bool Silent { get; private set; }
|
||||
public bool NoUi { get; private set; }
|
||||
public string RefTag { get; private set; }
|
||||
public string Version { get; private set; }
|
||||
public UpdateCheckOptionsAdv UpdateOptions { get; } = new();
|
||||
|
||||
public Options(string[] args)
|
||||
@@ -29,7 +30,8 @@ internal class Options
|
||||
{ "m|maintenance", "Ignores the maintenance mode.", m => UpdateOptions.IgnoreMaintenance = true},
|
||||
{ "i|nonpublic", "Include non public (currently hidden) updates.", i => UpdateOptions.IncludeNonPublic = true},
|
||||
{ "k|key=", "An key for retriving extra files on updates.", k => UpdateOptions.ExtrasKey = k},
|
||||
{ "r|reftag=", "Force uses a specific version, if supported.", r => RefTag = r},
|
||||
{ "r|reftag=", "Force uses a specific reference tag, if supported.", r => RefTag = r},
|
||||
{ "v|version=", "Force uses a specific version, if supported.", v => Version = v},
|
||||
};
|
||||
|
||||
additionals.AddRange(options.Parse(args));
|
||||
|
||||
@@ -106,6 +106,7 @@ public static class Program
|
||||
var installer = new ModpackInstaller(config, info)
|
||||
{
|
||||
OverwriteRefTag = Options.RefTag,
|
||||
OverwriteVersion = Options.Version,
|
||||
Log = Log,
|
||||
};
|
||||
var result = installer.Check(updateOptions).Result;
|
||||
|
||||
Reference in New Issue
Block a user