Skip to content

Commit

Permalink
Fix updater and update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Dec 28, 2024
1 parent f8070a8 commit df7e6ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ jobs:
run: echo "date=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT

- name: Go to output directory
run: cd FriishProduce\bin\Release\ && dir
run: cd FriishProduce\bin\Release\ && dir

- name: Compress archive
run: Compress-Archive -Path * -DestinationPath FriishProduce_latest.zip
4 changes: 2 additions & 2 deletions FriishProduce/_classes/Program/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ public static async Task<bool> GetLatest()
var client = new GitHubClient(new ProductHeaderValue("FriishProduce"));
var release = await client.Repository.Release.GetLatest("CatmanFan", "FriishProduce");

Version latest = new Version(release.TagName.Substring(1).Replace("-beta", ""));
Version latest = release.TagName.ToLower() == "latest" ? new Version("9.99") : new Version(release.TagName.Substring(1).Replace("-beta", ""));
Version current = new Version(GetCurrentVersion().Substring(1));

if (current.CompareTo(latest) < 0)
if (current.CompareTo(latest) < 0 && !release.Prerelease)
{
if (MessageBox.Show(string.Format(Program.Lang.Msg(8), latest, current), MessageBox.Buttons.YesNo, MessageBox.Icons.Shield) == MessageBox.Result.Yes)
{
Expand Down

0 comments on commit df7e6ca

Please sign in to comment.