Skip to content

Commit d39cc16

Browse files
author
Tim Etchells
committed
Add version requirement exception for internal builds
1 parent 3ec074e commit d39cc16

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dev/src/command/NewConnectionCmd.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ async function testConnection(connInfo: MCUtil.IConnectionInfo): Promise<Connect
173173

174174
// microclimate_version and workspace_location were both added in Microclimate 18.09
175175
// Portal Restart API improvement was added in 18.11
176-
const requiredVersion: number = 1811;
177-
const requiredVersionStr: string = "18.11"; // non-nls
176+
const requiredVersion: number = 1812;
177+
const requiredVersionStr: string = "18.12"; // non-nls
178+
const internalBuildRx: RegExp = /^\d{4}_M\d+_[EI]/;
178179

179180
/**
180181
* We've determined by this point that Microclimate is running at the given URI,
@@ -194,6 +195,8 @@ async function onSuccessfulConnection(mcUri: vscode.Uri, host: string, mcEnvData
194195
const rawVersion: string = mcEnvData.microclimate_version;
195196
const rawWorkspace: string = mcEnvData.workspace_location;
196197

198+
Log.d("rawVersion from Microclimate is", rawVersion);
199+
Log.d("rawWorkspace from Microclimate is", rawWorkspace);
197200
if (rawVersion == null || rawWorkspace == null) {
198201
Log.e("Microclimate environment did not provide either version or workspace. Data provided is:", mcEnvData);
199202
return reject(Translator.t(STRING_NS, "versionNotProvided", { requiredVersion: requiredVersionStr }));
@@ -206,6 +209,10 @@ async function onSuccessfulConnection(mcUri: vscode.Uri, host: string, mcEnvData
206209
Log.i("Dev version of Microclimate");
207210
versionNum = Number.MAX_SAFE_INTEGER;
208211
}
212+
else if (rawVersion.match(internalBuildRx) != null) {
213+
Log.i("Internal build of Microclimate");
214+
versionNum = Number.MAX_SAFE_INTEGER;
215+
}
209216
else {
210217
versionNum = Number(rawVersion);
211218
if (isNaN(versionNum)) {

0 commit comments

Comments
 (0)