From e811284d219931ac589451c120f5a09801643191 Mon Sep 17 00:00:00 2001 From: Alex Freska Date: Tue, 22 Oct 2024 14:31:29 -0400 Subject: [PATCH] fix(website): renterd and walletd provide latest full release --- .changeset/smooth-buses-pump.md | 6 ++++++ libs/data-sources/src/lib/github.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .changeset/smooth-buses-pump.md diff --git a/.changeset/smooth-buses-pump.md b/.changeset/smooth-buses-pump.md new file mode 100644 index 000000000..e4d829a32 --- /dev/null +++ b/.changeset/smooth-buses-pump.md @@ -0,0 +1,6 @@ +--- +'website': minor +'@siafoundation/data-sources': minor +--- + +The latest walletd and renterd releases no longer include prereleases. diff --git a/libs/data-sources/src/lib/github.ts b/libs/data-sources/src/lib/github.ts index 0a4a96ff4..14c1764de 100644 --- a/libs/data-sources/src/lib/github.ts +++ b/libs/data-sources/src/lib/github.ts @@ -183,10 +183,10 @@ export type GitHubRelease = { export async function getGitHubRenterdLatestDaemonRelease(): Promise { try { const response = await axios.get( - 'https://api.github.com/repos/SiaFoundation/renterd/releases?per_page=1' + 'https://api.github.com/repos/SiaFoundation/renterd/releases/latest' ) - if (response.data.length) { - return response.data[0] + if (response.data) { + return response.data } else { return null } @@ -215,10 +215,10 @@ export async function getGitHubHostdLatestDaemonRelease(): Promise { try { const response = await axios.get( - 'https://api.github.com/repos/SiaFoundation/walletd/releases?per_page=1' + 'https://api.github.com/repos/SiaFoundation/walletd/releases/latest' ) - if (response.data.length) { - return response.data[0] + if (response.data) { + return response.data } else { return null }