support first placeholder & overwriting version
This commit is contained in:
@@ -41,11 +41,13 @@ public static class Extensions
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetSourceUrl(this InstallAction @this, Version version)
|
||||
public static string GetSourceUrl(this InstallAction @this, Version version, string? overwriteVersion = null)
|
||||
{
|
||||
if (version is null)
|
||||
return @this.SourceUrl;
|
||||
return @this.SourceUrl.Replace("{version}", version.ToString(3));
|
||||
if (!string.IsNullOrWhiteSpace(overwriteVersion))
|
||||
return @this.SourceUrl.Replace("{version}", overwriteVersion);
|
||||
if (version is not null)
|
||||
return @this.SourceUrl.Replace("{version}", version.ToString(3));
|
||||
return @this.SourceUrl;
|
||||
}
|
||||
|
||||
public static string GetInstallUrl(this ModpackConfig @this, string? overwriteRefTag = null)
|
||||
|
||||
Reference in New Issue
Block a user