begin finding assets from bottom to top

This commit is contained in:
2024-09-05 15:17:01 +02:00
parent b4f0d43b46
commit 939c87820f

View File

@@ -259,7 +259,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
var release = await github.Repository.Release.Get(repo.Id, action.SourceTag);
var assets = await github.Repository.Release.GetAllAssets(repo.Id, release.Id);
if (assets.FirstOrDefault(asset => Regex.IsMatch(asset.Name, action.SourceRegex)) is ReleaseAsset asset)
if (assets.LastOrDefault(asset => Regex.IsMatch(asset.Name, action.SourceRegex)) is ReleaseAsset asset)
return asset.BrowserDownloadUrl;
}