@@ -8,7 +8,7 @@ import * as os from "os";
8
8
import * as path from "path" ;
9
9
import * as WebSocket from "ws" ;
10
10
import { buildDir , cacheHome , dataHome , isCli , serveStatic } from "./constants" ;
11
- import { getRecentRelease , compareVersions } from "./updater" ;
11
+ import { getRecentRelease } from "./updater" ;
12
12
import { setup as setupNativeModules } from "./modules" ;
13
13
import { createApp } from "./server" ;
14
14
import { forkModule , requireFork , requireModule } from "./vscode/bootstrapFork" ;
@@ -144,25 +144,16 @@ const bold = (text: string | number): string | number => {
144
144
}
145
145
}
146
146
147
- let newestVersion = "" ;
148
- if ( process . env . VERSION ) {
147
+ if ( isCli ) {
149
148
let currentVersion = process . env . VERSION ;
150
149
const recentRelease = await getRecentRelease ( ) ;
151
150
152
- if ( compareVersions ( currentVersion , recentRelease ) ! <= 1 ) {
153
- newestVersion = recentRelease ;
154
- } else {
155
- newestVersion = currentVersion ;
151
+ if ( recentRelease !== currentVersion ) {
152
+ logger . warn ( `New version (\u001B[1m${ recentRelease } \u001B[0m) available https://github.com/codercom/code-server/releases/latest` ) ;
156
153
}
157
154
}
158
- const isDev = process . env . NODE_ENV !== "production" ;
159
- if ( newestVersion === process . env . VERSION || isDev ) {
160
- logger . info ( "You are using the latest version" ) ;
161
- } else {
162
- logger . warn ( `New version (\u001B[1m${ newestVersion } ) available https://github.com/codercom/code-server/releases` ) ;
163
- }
164
- logger . info ( `\u001B[1mcode-server ${ process . env . VERSION ? `v${ process . env . VERSION } ` : "development" } ` ) ;
165
155
// TODO: fill in appropriate doc url
156
+ logger . info ( `\u001B[1mcode-server ${ process . env . VERSION ? `v${ process . env . VERSION } ` : "development" } ` ) ;
166
157
logger . info ( "Additional documentation: http://github.com/codercom/code-server" ) ;
167
158
logger . info ( "Initializing" , field ( "data-dir" , dataDir ) , field ( "working-dir" , workingDir ) , field ( "log-dir" , logDir ) ) ;
168
159
const sharedProcess = new SharedProcess ( dataDir , builtInExtensionsDir ) ;
0 commit comments