A local-first personal finance app
Use the latest release tag instead of the latest tag for version checks (#4933)
Julian Dominguez-Schatzcabb7149f017
diff --git a/packages/desktop-client/src/util/versions.ts b/packages/desktop-client/src/util/versions.tsindex 0b2ac7b686..d8c1033dd6 100644--- a/packages/desktop-client/src/util/versions.ts+++ b/packages/desktop-client/src/util/versions.ts@@ -25,15 +25,10 @@ export async function getLatestVersion(): Promise<string | 'unknown'> {try {const response = await fetch(- 'https://api.github.com/repos/actualbudget/actual/tags',+ 'https://api.github.com/repos/actualbudget/actual/releases/latest',);const json = await response.json();- const tags = json- .map(t => t.name)- .concat([`v${window.Actual.ACTUAL_VERSION}`]);- tags.sort(cmpSemanticVersion);-- return tags[tags.length - 1];+ return json?.tag_name ?? 'unknown';} catch {// Rate limit exceeded? Or perhaps GitHub is down?return 'unknown';diff --git a/upcoming-release-notes/4933.md b/upcoming-release-notes/4933.mdnew file mode 100644index 0000000000..d05bed063b--- /dev/null+++ b/upcoming-release-notes/4933.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [jfdoming]+---++Use the latest release tag instead of the latest tag for version checks