Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Mar 24, 2024
2 parents 020fa9e + 3c92878 commit ed79da5
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions apps/web/app/api/releases/tauri/[version]/[target]/[arch]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,10 @@ export async function GET(
}
) {
try {
let release;
if (params.version === "latest") {
const { data } = await octokit.repos.getLatestRelease({
owner: "capsoftware",
repo: "cap",
});
release = data;
} else {
const { data } = await octokit.repos.getReleaseByTag({
owner: "capsoftware",
repo: "cap",
tag: `cap-v${params.version}`,
});
release = data;
}
const { data: release } = await octokit.repos.getLatestRelease({
owner: "capsoftware",
repo: "cap",
});

const version = release.tag_name.replace("cap-v", "");
const notes = release.body;
Expand Down

1 comment on commit ed79da5

@vercel
Copy link

@vercel vercel bot commented on ed79da5 Mar 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.