Skip to content

Commit 565a9c5

Browse files
committed
release: 0.10.1
Fixes CLI-5F fix(upgrade): remove incorrect 'v' prefix from GitHub release URLs The download URL and version-exists check both added a 'v' prefix to the version in GitHub release URLs (e.g. /download/v0.10.0/...), but this repo's release tags do not use 'v' prefixes (e.g. /download/0.10.0/...). This caused all curl-based upgrades to fail with HTTP 404. Also adds noMerge: true to .craft.yml since this is a hotfix release from the 0.10.0 tag that should not merge back to main.
1 parent f0e1086 commit 565a9c5

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

.craft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
minVersion: '2.21.1'
2+
noMerge: true
23
changelog:
34
policy: auto
45
versioning:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "Sentry CLI - A command-line interface for using Sentry built by robots and humans for robots and humans",
55
"type": "module",
66
"bin": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "sentry-cli",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "Skills for using the Sentry CLI to interact with Sentry from the command line"
55
}

src/lib/binary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function getBinaryDownloadUrl(version: string): string {
3939
const arch = process.arch === "arm64" ? "arm64" : "x64";
4040
const suffix = process.platform === "win32" ? ".exe" : "";
4141

42-
return `https://github.com/getsentry/cli/releases/download/v${version}/sentry-${os}-${arch}${suffix}`;
42+
return `https://github.com/getsentry/cli/releases/download/${version}/sentry-${os}-${arch}${suffix}`;
4343
}
4444

4545
/**

src/lib/upgrade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export async function versionExists(
316316
): Promise<boolean> {
317317
if (method === "curl") {
318318
const response = await fetchWithUpgradeError(
319-
`${GITHUB_RELEASES_URL}/tags/v${version}`,
319+
`${GITHUB_RELEASES_URL}/tags/${version}`,
320320
{ method: "HEAD", headers: getGitHubHeaders() },
321321
"GitHub"
322322
);

test/commands/cli/upgrade.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@ function mockGitHubVersion(version: string): void {
101101

102102
// GitHub latest release endpoint — returns JSON with tag_name
103103
if (urlStr.includes("releases/latest")) {
104-
return new Response(JSON.stringify({ tag_name: `v${version}` }), {
104+
return new Response(JSON.stringify({ tag_name: version }), {
105105
status: 200,
106106
headers: { "content-type": "application/json" },
107107
});
108108
}
109109

110110
// GitHub tag check (for versionExists)
111-
if (urlStr.includes("/releases/tag/")) {
112-
const requested = urlStr.split("/releases/tag/v")[1];
111+
if (urlStr.includes("/releases/tags/")) {
112+
const requested = urlStr.split("/releases/tags/")[1];
113113
if (requested === version) {
114-
return new Response(JSON.stringify({ tag_name: `v${version}` }), {
114+
return new Response(JSON.stringify({ tag_name: version }), {
115115
status: 200,
116116
headers: { "content-type": "application/json" },
117117
});

test/lib/binary.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ describe("getBinaryDownloadUrl", () => {
3131
test("builds correct URL for current platform", () => {
3232
const url = getBinaryDownloadUrl("1.0.0");
3333

34-
expect(url).toContain("/v1.0.0/");
34+
expect(url).toContain("/1.0.0/");
3535
expect(url).toStartWith(
36-
"https://github.com/getsentry/cli/releases/download/v"
36+
"https://github.com/getsentry/cli/releases/download/"
3737
);
3838
expect(url).toContain("sentry-");
3939

test/lib/upgrade.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ describe("getBinaryDownloadUrl", () => {
437437
test("builds correct URL for current platform", () => {
438438
const url = getBinaryDownloadUrl("1.0.0");
439439

440-
// URL should contain the version with 'v' prefix (GitHub tag format)
441-
expect(url).toContain("/v1.0.0/");
440+
// URL should contain the version (no 'v' prefix — this repo's tags are unpreixed)
441+
expect(url).toContain("/1.0.0/");
442442
expect(url).toStartWith(
443-
"https://github.com/getsentry/cli/releases/download/v"
443+
"https://github.com/getsentry/cli/releases/download/"
444444
);
445445
expect(url).toContain("sentry-");
446446

0 commit comments

Comments
 (0)