#34 Ignore pre-releases

This commit is contained in:
Serraniel 2020-07-27 12:58:56 +02:00
parent a32cf6c6ad
commit 59b7927fc6
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -17,7 +17,7 @@ namespace Discord_Media_Loader.Helper
var github = new GitHubClient(new ProductHeaderValue("DiscordMedialLoader"));
var tag =
(await github.Repository.Release.GetAll("Serraniel", "DiscordMediaLoader")).OrderByDescending(x => x.CreatedAt).First().TagName.Replace("v", "") ?? "";
(await github.Repository.Release.GetAll("Serraniel", "DiscordMediaLoader")).Where(x => x.Prerelease == false).OrderByDescending(x => x.CreatedAt).First().TagName.Replace("v", "") ?? "";
var version = new Version(tag);
return version;