Skip to content

Commit 3986f2e

Browse files
author
John McCambridge
committed
Import getRecentRelease to cli
1 parent 7ef744f commit 3986f2e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/server/src/cli.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as os from "os";
88
import * as path from "path";
99
import * as WebSocket from "ws";
1010
import { buildDir, cacheHome, dataHome, isCli, serveStatic } from "./constants";
11+
import { getRecentRelease } from "./updater";
1112
import { createApp } from "./server";
1213
import { forkModule, requireModule } from "./vscode/bootstrapFork";
1314
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
@@ -165,6 +166,10 @@ const bold = (text: string | number): string | number => {
165166
}
166167
}
167168

169+
if (process.env.VERSION !== "development") {
170+
await getRecentRelease().then((release) => console.log(release));
171+
}
172+
168173
logger.info(`\u001B[1mcode-server ${process.env.VERSION ? `v${process.env.VERSION}` : "development"}`);
169174

170175
if (options.dataDir) {

packages/server/src/updater.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const compareVersions = (a: string, b: string): number | undefined => {
2020
}
2121
};
2222

23-
const getRecentRelease = (): Promise<any> => {
23+
export const getRecentRelease = (): Promise<any> => {
2424
return new Promise<string>((resolve, rej) => {
2525
const options = {
2626
host: "api.github.com",

0 commit comments

Comments
 (0)