Pin nightly SSH bootstrap to desktop version
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
1f5187f0fa
commit
7fd550ec31
2 files changed
+10
-7
No files matched your search
@@ -190,6 +190,13 @@ describe("sshEnvironment", () => {
|
||||
appVersion: "0.0.17-nightly.20260415.44",
|
||||
updateChannel: "nightly",
|
||||
}),
|
||||
).toBe("[email protected]");
|
||||
expect(
|
||||
__test.resolveRemoteT3CliPackageSpec({
|
||||
appVersion: "0.0.0-dev",
|
||||
updateChannel: "nightly",
|
||||
isDevelopment: true,
|
||||
}),
|
||||
).toBe("t3@nightly");
|
||||
});
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ const REMOTE_PORT_SCAN_WINDOW = 200;
|
||||
const SSH_ASKPASS_DIR_NAME = "t3code-ssh-askpass";
|
||||
const TUNNEL_SHUTDOWN_TIMEOUT_MS = 2_000;
|
||||
const SSH_READY_TIMEOUT_MS = 20_000;
|
||||
const STABLE_T3_VERSION_PATTERN = /^\d+\.\d+\.\d+$/u;
|
||||
const PUBLISHABLE_T3_VERSION_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u;
|
||||
|
||||
interface SshTunnelEntry {
|
||||
readonly key: string;
|
||||
@@ -673,16 +673,12 @@ export function resolveRemoteT3CliPackageSpec(input: {
|
||||
readonly updateChannel: DesktopUpdateChannel;
|
||||
readonly isDevelopment?: boolean;
|
||||
}): string {
|
||||
if (input.updateChannel === "nightly") {
|
||||
return "t3@nightly";
|
||||
}
|
||||
|
||||
const appVersion = input.appVersion.trim();
|
||||
if (!input.isDevelopment && STABLE_T3_VERSION_PATTERN.test(appVersion)) {
|
||||
if (!input.isDevelopment && PUBLISHABLE_T3_VERSION_PATTERN.test(appVersion)) {
|
||||
return `t3@${appVersion}`;
|
||||
}
|
||||
|
||||
return "t3@latest";
|
||||
return input.updateChannel === "nightly" ? "t3@nightly" : "t3@latest";
|
||||
}
|
||||
|
||||
function buildRemoteT3RunnerScript(input?: { readonly packageSpec?: string }): string {
|
||||
|
||||
Reference in new issue
Block a user