Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use truncated version with signature fallback#574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
code-asher merged 2 commits intomainfromasher/truncate-version
Aug 13, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletionssrc/storage.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@ import fs from "fs/promises";
import { IncomingMessage } from "http";
import path from "path";
import prettyBytes from "pretty-bytes";
import * as semver from "semver";
import * as vscode from "vscode";
import { errToStr } from "./api-helper";
import * as cli from "./cliManager";
Expand DownExpand Up@@ -139,6 +140,12 @@ export class Storage {
// and to log for debugging.
const buildInfo = await restClient.getBuildInfo();
this.output.info("Got server version", buildInfo.version);
const parsedVersion = semver.parse(buildInfo.version);
if (!parsedVersion) {
throw new Error(
`Got invalid version from deployment: ${buildInfo.version}`,
);
}

// Check if there is an existing binary and whether it looks valid. If it
// is valid and matches the server, or if it does not match the server but
Expand DownExpand Up@@ -230,9 +237,11 @@ export class Storage {
// named exactly the same with an appended `.asc` (such as
// coder-windows-amd64.exe.asc or coder-linux-amd64.asc).
binSource + ".asc",
// The releases.coder.com bucket does not include the leading "v".
// The signature name follows the same rule as above.
`https://releases.coder.com/coder-cli/${buildInfo.version.replace(/^v/, "")}/${binName}.asc`,
// The releases.coder.com bucket does not include the leading "v",
// and unlike what we get from buildinfo it uses a truncated version
// with only major.minor.patch. The signature name follows the same
// rule as above.
`https://releases.coder.com/coder-cli/${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}/${binName}.asc`,
]);
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp