Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Redstone 5 #804

Merged
merged 6 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 4 additions & 2 deletions configureWorkspace/configure_dotnetcore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as nodeOs from 'os';
import * as path from 'path';
import * as semver from 'semver';
import { extractRegExGroups } from '../helpers/extractRegExGroups';
import { isWindows, isWindows10RS3OrNewer, isWindows10RS4OrNewer } from '../helpers/osVersion';
import { isWindows, isWindows10RS3OrNewer, isWindows10RS4OrNewer, isWindows10RS5OrNewer } from '../helpers/osVersion';
import { Platform, PlatformOS } from '../utils/platform';
import { getExposeStatements, IPlatformGeneratorInfo, PackageInfo } from './configure';

Expand Down Expand Up @@ -36,8 +36,10 @@ const DotNetCoreSdkImageFormat = "microsoft/dotnet:{0}.{1}-sdk{2}";

function GetWindowsImageTag(): string {
// The host OS version needs to match the version of .NET core images being created
if (!isWindows() || isWindows10RS4OrNewer()) {
if (!isWindows() || isWindows10RS5OrNewer()) {
// If we're not on Windows (and therefore can't detect the version), assume a Windows RS4 host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

return "-nanoserver-1809";
} else if (isWindows10RS4OrNewer()) {
return "-nanoserver-1803";
} else if (isWindows10RS3OrNewer()) {
return "-nanoserver-1709";
Expand Down
2 changes: 1 addition & 1 deletion extension.bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export { IKeytar } from './utils/keytar';
export { throwDockerConnectionError, internal } from './explorer/utils/dockerConnectionError';
export { getImageOrContainerDisplayName } from './explorer/models/getImageOrContainerDisplayName';
export { trimWithElipsis } from './explorer/utils/utils';
export { isWindows10RS3OrNewer, isWindows10RS4OrNewer } from "./helpers/osVersion";
export { isWindows10RS3OrNewer, isWindows10RS4OrNewer, isWindows10RS5OrNewer } from "./helpers/osVersion";
export { LineSplitter } from './debugging/coreclr/lineSplitter';
export { CommandLineBuilder } from './debugging/coreclr/commandLineBuilder';
export { DockerClient } from './debugging/coreclr/dockerClient';
Expand Down
11 changes: 11 additions & 0 deletions helpers/osVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ const windows10RS3MinVersion = '10.0.16299';
// Minimum Windows RS4 version number
const windows10RS4MinVersion = '10.0.17134';

// Minimum Windows RS5 version number
const windows10RS5MinVersion = "10.0.17763";

export function isWindows(): boolean {
return ext.os.platform === 'win32';
}

export function isWindows10RS5OrNewer(): boolean {
if (!isWindows()) {
return false;
}

return semver.gte(ext.os.release, windows10RS5MinVersion);
}

export function isWindows10RS4OrNewer(): boolean {
if (!isWindows()) {
return false;
Expand Down