add support for {ref} placeholder
This commit is contained in:
@@ -47,4 +47,18 @@ public static class Extensions
|
||||
return @this.SourceUrl;
|
||||
return @this.SourceUrl.Replace("{version}", version.ToString(3));
|
||||
}
|
||||
|
||||
public static string GetInstallUrl(this ModpackConfig @this)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(@this.RefTag))
|
||||
return @this.InstallUrl;
|
||||
return @this.InstallUrl.Replace("{ref}", @this.RefTag);
|
||||
}
|
||||
|
||||
public static string GetUpdateUrl(this ModpackConfig @this)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(@this.RefTag))
|
||||
return @this.UpdateUrl;
|
||||
return @this.UpdateUrl.Replace("{ref}", @this.RefTag);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user