diff --git a/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson b/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson
index 83a10d77256a..bbb579b7cf1c 100644
--- a/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson
+++ b/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson
@@ -88,7 +88,7 @@
"loc.messages.Error_NoSourceSpecifiedForPush": "No source was specified for push",
"loc.messages.Error_NoValueFoundForEnvVar": "No value was found for the provided environment variable.",
"loc.messages.Error_NoVersionFoundInBuildNumber": "Could not find version number data in the following environment variable: BUILD_BUILDNUMBER. The value of the variable should contain a substring with the following formats: X.Y.Z or X.Y.Z.A where A, X, Y, and Z are positive integers.",
- "loc.messages.Error_PackageFailure": "An error ocurred while trying to pack the files.",
+ "loc.messages.Error_PackageFailure": "An error occurred while trying to pack the files.",
"loc.messages.Error_PushNotARegularFile": "%s is not a file. Check the 'Path/Pattern to nupkg' property of the task.",
"loc.messages.Info_AttemptingToPackFile": "Attempting to pack file: ",
"loc.messages.Info_NoPackagesMatchedTheSearchPattern": "No packages matched the search pattern.",
diff --git a/Tasks/DotNetCoreCLIV2/task.json b/Tasks/DotNetCoreCLIV2/task.json
index 8d772d0ff211..bca694f03f5f 100644
--- a/Tasks/DotNetCoreCLIV2/task.json
+++ b/Tasks/DotNetCoreCLIV2/task.json
@@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 158,
- "Patch": 0
+ "Patch": 1
},
"minimumAgentVersion": "2.115.0",
"instanceNameFormat": "dotnet $(command)",
@@ -514,7 +514,7 @@
"Error_NoSourceSpecifiedForPush": "No source was specified for push",
"Error_NoValueFoundForEnvVar": "No value was found for the provided environment variable.",
"Error_NoVersionFoundInBuildNumber": "Could not find version number data in the following environment variable: BUILD_BUILDNUMBER. The value of the variable should contain a substring with the following formats: X.Y.Z or X.Y.Z.A where A, X, Y, and Z are positive integers.",
- "Error_PackageFailure": "An error ocurred while trying to pack the files.",
+ "Error_PackageFailure": "An error occurred while trying to pack the files.",
"Error_PushNotARegularFile": "%s is not a file. Check the 'Path/Pattern to nupkg' property of the task.",
"Info_AttemptingToPackFile": "Attempting to pack file: ",
"Info_NoPackagesMatchedTheSearchPattern": "No packages matched the search pattern.",
diff --git a/Tasks/DotNetCoreCLIV2/task.loc.json b/Tasks/DotNetCoreCLIV2/task.loc.json
index 717d6e98c9cd..4555f3de7f24 100644
--- a/Tasks/DotNetCoreCLIV2/task.loc.json
+++ b/Tasks/DotNetCoreCLIV2/task.loc.json
@@ -18,7 +18,7 @@
"version": {
"Major": 2,
"Minor": 158,
- "Patch": 0
+ "Patch": 1
},
"minimumAgentVersion": "2.115.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
diff --git a/Tasks/KubernetesManifestV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/KubernetesManifestV0/Strings/resources.resjson/en-US/resources.resjson
index 69dae446fe55..837d17b791ea 100644
--- a/Tasks/KubernetesManifestV0/Strings/resources.resjson/en-US/resources.resjson
+++ b/Tasks/KubernetesManifestV0/Strings/resources.resjson/en-US/resources.resjson
@@ -1,5 +1,5 @@
{
- "loc.friendlyName": "Deploy Kubernetes manifests",
+ "loc.friendlyName": "Deploy to Kubernetes",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=851275) or [see the Kubernetes documentation](https://kubernetes.io/docs/home/)",
"loc.description": "Use Kubernetes manifest files to deploy to clusters or even bake the manifest files to be used for deployments using Helm charts",
"loc.instanceNameFormat": "$(action)",
diff --git a/Tasks/KubernetesManifestV0/task.json b/Tasks/KubernetesManifestV0/task.json
index c686c66a038d..3d567def2f25 100644
--- a/Tasks/KubernetesManifestV0/task.json
+++ b/Tasks/KubernetesManifestV0/task.json
@@ -1,7 +1,7 @@
{
"id": "DEE316A2-586F-4DEF-BE79-488A1F503DFE",
"name": "KubernetesManifest",
- "friendlyName": "Deploy Kubernetes manifests",
+ "friendlyName": "Deploy to Kubernetes",
"description": "Use Kubernetes manifest files to deploy to clusters or even bake the manifest files to be used for deployments using Helm charts",
"helpUrl": "https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/kubernetes-manifest",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=851275) or [see the Kubernetes documentation](https://kubernetes.io/docs/home/)",
@@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 158,
- "Patch": 0
+ "Patch": 1
},
"demands": [],
"groups": [],
diff --git a/Tasks/KubernetesManifestV0/task.loc.json b/Tasks/KubernetesManifestV0/task.loc.json
index ff27f5467ec3..fe9f514f7ba1 100644
--- a/Tasks/KubernetesManifestV0/task.loc.json
+++ b/Tasks/KubernetesManifestV0/task.loc.json
@@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 158,
- "Patch": 0
+ "Patch": 1
},
"demands": [],
"groups": [],
diff --git a/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson
index afeda7acd7f5..662b44f0dafd 100644
--- a/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson
+++ b/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson
@@ -1,5 +1,5 @@
{
- "loc.friendlyName": "Deploy to Kubernetes",
+ "loc.friendlyName": "Kubectl",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=851275)",
"loc.description": "Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands",
"loc.instanceNameFormat": "kubectl $(command)",
diff --git a/Tasks/KubernetesV0/task.json b/Tasks/KubernetesV0/task.json
index 1aec0c836a4d..954f5ed2af63 100644
--- a/Tasks/KubernetesV0/task.json
+++ b/Tasks/KubernetesV0/task.json
@@ -1,7 +1,7 @@
{
"id": "CBC316A2-586F-4DEF-BE79-488A1F503564",
"name": "Kubernetes",
- "friendlyName": "Deploy to Kubernetes",
+ "friendlyName": "Kubectl",
"description": "Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/kubernetes",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=851275)",
@@ -13,7 +13,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
- "Minor": 157,
+ "Minor": 158,
"Patch": 0
},
"demands": [],
diff --git a/Tasks/KubernetesV0/task.loc.json b/Tasks/KubernetesV0/task.loc.json
index 620acc2a94bd..2249372580bd 100644
--- a/Tasks/KubernetesV0/task.loc.json
+++ b/Tasks/KubernetesV0/task.loc.json
@@ -13,7 +13,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
- "Minor": 157,
+ "Minor": 158,
"Patch": 0
},
"demands": [],
@@ -370,4 +370,4 @@
"OutputVariableDataSizeExceeded": "ms-resource:loc.messages.OutputVariableDataSizeExceeded",
"WritingDockerConfigToTempFile": "ms-resource:loc.messages.WritingDockerConfigToTempFile"
}
-}
+}
\ No newline at end of file
diff --git a/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson b/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson
index f57e6eb7381d..569e3483d457 100644
--- a/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson
+++ b/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson
@@ -1,5 +1,5 @@
{
- "loc.friendlyName": "Deploy to Kubernetes",
+ "loc.friendlyName": "Kubectl",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=851275) or [see the Kubernetes documentation](https://kubernetes.io/docs/home/)",
"loc.description": "Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands",
"loc.instanceNameFormat": "kubectl $(command)",
diff --git a/Tasks/KubernetesV1/task.json b/Tasks/KubernetesV1/task.json
index 23d98ea0b30d..90164bd4bff0 100644
--- a/Tasks/KubernetesV1/task.json
+++ b/Tasks/KubernetesV1/task.json
@@ -1,7 +1,7 @@
{
"id": "CBC316A2-586F-4DEF-BE79-488A1F503564",
"name": "Kubernetes",
- "friendlyName": "Deploy to Kubernetes",
+ "friendlyName": "Kubectl",
"description": "Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/kubernetes",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=851275) or [see the Kubernetes documentation](https://kubernetes.io/docs/home/)",
@@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 158,
- "Patch": 1
+ "Patch": 2
},
"demands": [],
"releaseNotes": "What's new in Version 1.0:
Added new service connection type input for easy selection of Azure AKS cluster.
Replaced output variable input with output variables section that we had added in all tasks.",
diff --git a/Tasks/KubernetesV1/task.loc.json b/Tasks/KubernetesV1/task.loc.json
index e57f5bb1da7c..5605205c0fe6 100644
--- a/Tasks/KubernetesV1/task.loc.json
+++ b/Tasks/KubernetesV1/task.loc.json
@@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 158,
- "Patch": 1
+ "Patch": 2
},
"demands": [],
"releaseNotes": "ms-resource:loc.releaseNotes",
diff --git a/Tasks/NuGetCommandV2/Strings/resources.resjson/en-US/resources.resjson b/Tasks/NuGetCommandV2/Strings/resources.resjson/en-US/resources.resjson
index 067b07d50592..c640fd6a1904 100644
--- a/Tasks/NuGetCommandV2/Strings/resources.resjson/en-US/resources.resjson
+++ b/Tasks/NuGetCommandV2/Strings/resources.resjson/en-US/resources.resjson
@@ -91,7 +91,7 @@
"loc.messages.Error_NoVersionFoundInBuildNumber": "Could not find version number data in the following environment variable: BUILD_BUILDNUMBER. The value of the variable should contain a substring with the following formats: X.Y.Z or X.Y.Z.A where A, X, Y, and Z are positive integers.",
"loc.messages.Warning_MoreThanOneVersionInBuildNumber": "Found more than one instance of version data in BUILD_BUILDNUMBER.Assuming first instance is version.",
"loc.messages.Error_NoValueFoundForEnvVar": "No value was found for the provided environment variable.",
- "loc.messages.Error_PackageFailure": "An error ocurred while trying to pack the files.",
+ "loc.messages.Error_PackageFailure": "An error occurred while trying to pack the files.",
"loc.messages.Info_AttemptingToPackFile": "Attempting to pack file: ",
"loc.messages.Warning_NoConfigForOldNuGet": "To connect to NuGet feeds hosted in your Azure DevOps organization with NuGet 3.1 or below, edit your build pipeline to specify a path to a NuGet.config containing the package sources you wish to use.",
"loc.messages.PackagesPublishedSuccessfully": "Packages were published successfully",
diff --git a/Tasks/NuGetCommandV2/nugetpublisher.ts b/Tasks/NuGetCommandV2/nugetpublisher.ts
index 3b3d2da11799..adcd60d728fb 100644
--- a/Tasks/NuGetCommandV2/nugetpublisher.ts
+++ b/Tasks/NuGetCommandV2/nugetpublisher.ts
@@ -299,7 +299,7 @@ function publishPackageNuGet(
if (execResult.code !== 0) {
telemetry.logResult("Packaging", "NuGetCommand", execResult.code);
if(continueOnConflict && execResult.stderr.indexOf("The feed already contains")>0){
- tl.debug(`A conflict ocurred with package ${packageFile}, ignoring it since "Allow duplicates" was selected.`);
+ tl.debug(`A conflict occurred with package ${packageFile}, ignoring it since "Allow duplicates" was selected.`);
return {
code: 0,
stdout: execResult.stderr,
@@ -336,7 +336,7 @@ function publishPackageVstsNuGetPush(packageFile: string, options: IVstsNuGetPus
// ExitCode 2 means a push conflict occurred
if (execResult.code === 2 && options.settings.continueOnConflict) {
- tl.debug(`A conflict ocurred with package ${packageFile}, ignoring it since "Allow duplicates" was selected.`);
+ tl.debug(`A conflict occurred with package ${packageFile}, ignoring it since "Allow duplicates" was selected.`);
return;
}
diff --git a/Tasks/NuGetCommandV2/task.json b/Tasks/NuGetCommandV2/task.json
index aaa063b80092..174c59598ddc 100644
--- a/Tasks/NuGetCommandV2/task.json
+++ b/Tasks/NuGetCommandV2/task.json
@@ -10,7 +10,7 @@
"version": {
"Major": 2,
"Minor": 158,
- "Patch": 0
+ "Patch": 1
},
"runsOn": [
"Agent",
@@ -491,7 +491,7 @@
"Error_NoVersionFoundInBuildNumber": "Could not find version number data in the following environment variable: BUILD_BUILDNUMBER. The value of the variable should contain a substring with the following formats: X.Y.Z or X.Y.Z.A where A, X, Y, and Z are positive integers.",
"Warning_MoreThanOneVersionInBuildNumber": "Found more than one instance of version data in BUILD_BUILDNUMBER.Assuming first instance is version.",
"Error_NoValueFoundForEnvVar": "No value was found for the provided environment variable.",
- "Error_PackageFailure": "An error ocurred while trying to pack the files.",
+ "Error_PackageFailure": "An error occurred while trying to pack the files.",
"Info_AttemptingToPackFile": "Attempting to pack file: ",
"Warning_NoConfigForOldNuGet": "To connect to NuGet feeds hosted in your Azure DevOps organization with NuGet 3.1 or below, edit your build pipeline to specify a path to a NuGet.config containing the package sources you wish to use.",
"PackagesPublishedSuccessfully": "Packages were published successfully",
diff --git a/Tasks/NuGetCommandV2/task.loc.json b/Tasks/NuGetCommandV2/task.loc.json
index 6c1c21c0e920..9fcb61d03c9a 100644
--- a/Tasks/NuGetCommandV2/task.loc.json
+++ b/Tasks/NuGetCommandV2/task.loc.json
@@ -10,7 +10,7 @@
"version": {
"Major": 2,
"Minor": 158,
- "Patch": 0
+ "Patch": 1
},
"runsOn": [
"Agent",
diff --git a/Tasks/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts b/Tasks/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts
index 9495418667c5..f10c0f0b2bfd 100644
--- a/Tasks/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts
+++ b/Tasks/UseDotNetV2/Tests/versionFetcherGetDownloadUrlPassTests.ts
@@ -69,12 +69,12 @@ mockery.registerMock('azure-pipelines-task-lib/task', {
import { DotNetCoreVersionFetcher } from "../versionfetcher";
import { VersionInfo } from '../models';
-let versionFetcher = new DotNetCoreVersionFetcher();
try {
let versionInfo = new VersionInfo(JSON.parse(`{"version":"2.2.104", "files": [{"name": "linux.tar.gz", "rid":"linux-x64", "url": "https://path.to/file.tar.gz"}, {"name": "osx.pkg", "rid":"osx-x64", "url": "https://path.to/file.pkg"}, {"name": "osx.tar.gz", "rid":"osx-x64", "url": "https://path.toMac/file.tar.gz"}, {"name": "win.exe", "rid":"win-x64", "url": "https://path.to/file.exe"}, {"name": "win.zip", "rid":"win-x64", "url": "https://path.to/file.zip"}]}`), "sdk");
// Test for windows
osType = "win";
+ let versionFetcher = new DotNetCoreVersionFetcher();
let downloadUrl = versionFetcher.getDownloadUrl(versionInfo);
if (downloadUrl != "https://path.to/file.zip") {
throw "";
@@ -82,6 +82,7 @@ try {
// Test for linux
osType = "linux";
+ versionFetcher = new DotNetCoreVersionFetcher();
downloadUrl = versionFetcher.getDownloadUrl(versionInfo);
if (downloadUrl != "https://path.to/file.tar.gz") {
throw "";
@@ -89,6 +90,7 @@ try {
// Test for mac os
osType = "osx";
+ versionFetcher = new DotNetCoreVersionFetcher();
downloadUrl = versionFetcher.getDownloadUrl(versionInfo);
if (downloadUrl != "https://path.toMac/file.tar.gz") {
throw "";
diff --git a/Tasks/UseDotNetV2/versionfetcher.ts b/Tasks/UseDotNetV2/versionfetcher.ts
index c1ac2eb3abd5..df522dc88d7f 100644
--- a/Tasks/UseDotNetV2/versionfetcher.ts
+++ b/Tasks/UseDotNetV2/versionfetcher.ts
@@ -14,6 +14,9 @@ import * as utils from "./versionutilities";
export class DotNetCoreVersionFetcher {
private explicitVersioning: boolean = false;
+ private channels: Channel[];
+ private httpCallbackClient: httpClient.HttpClient;
+ private machineOsSuffixes: string[];
constructor(explicitVersioning: boolean = false) {
this.explicitVersioning = explicitVersioning;
let proxyUrl: string = tl.getVariable("agent.proxyurl");
@@ -58,9 +61,9 @@ export class DotNetCoreVersionFetcher {
public getDownloadUrl(versionInfo: VersionInfo): string {
console.log(tl.loc("GettingDownloadUrl", versionInfo.getPackageType(), versionInfo.getVersion()));
- let osSuffixes = this.detectMachineOS();
+ this.detectMachineOS();
let downloadPackageInfoObject: VersionFilesData = null;
- osSuffixes.find((osSuffix) => {
+ this.machineOsSuffixes.find((osSuffix) => {
downloadPackageInfoObject = versionInfo.getFiles().find((downloadPackageInfo: VersionFilesData) => {
if (downloadPackageInfo.rid && osSuffix && downloadPackageInfo.rid.toLowerCase() == osSuffix.toLowerCase()) {
if ((osSuffix.split("-")[0] == "win" && downloadPackageInfo.name.endsWith(".zip")) || (osSuffix.split("-")[0] != "win" && downloadPackageInfo.name.endsWith("tar.gz"))) {
@@ -79,7 +82,7 @@ export class DotNetCoreVersionFetcher {
return downloadPackageInfoObject.url;
}
- throw tl.loc("DownloadUrlForMatchingOsNotFound", versionInfo.getPackageType(), versionInfo.getVersion(), osSuffixes.toString());
+ throw tl.loc("DownloadUrlForMatchingOsNotFound", versionInfo.getPackageType(), versionInfo.getVersion(), this.machineOsSuffixes.toString());
}
private setReleasesIndex(): Promise {
@@ -162,7 +165,7 @@ export class DotNetCoreVersionFetcher {
tl.debug(tl.loc("VersionInformationNotComplete", release[packageType].version, err));
}
}
- if (release && release[packageType] && release[packageType].version && !versionInfoList.find((versionInfo) => { return versionInfo.getVersion() === release[packageType].version }) ) {
+ if (release && release[packageType] && release[packageType].version && !versionInfoList.find((versionInfo) => { return versionInfo.getVersion() === release[packageType].version })) {
try {
let versionInfo: VersionInfo = new VersionInfo(release[packageType], packageType);
versionInfoList.push(versionInfo);
@@ -223,58 +226,60 @@ export class DotNetCoreVersionFetcher {
return adjacentChannels;
}
- private detectMachineOS(): string[] {
- let osSuffix = [];
- let scriptRunner: trm.ToolRunner;
+ private detectMachineOS(): void {
+ if (!this.machineOsSuffixes) {
+ let osSuffix = [];
+ let scriptRunner: trm.ToolRunner;
+
+ try {
+ console.log(tl.loc("DetectingPlatform"));
+ if (tl.osType().match(/^Win/)) {
+ let escapedScript = path.join(this.getCurrentDir(), 'externals', 'get-os-platform.ps1').replace(/'/g, "''");
+ let command = `& '${escapedScript}'`;
+
+ let powershellPath = tl.which('powershell', true);
+ scriptRunner = tl.tool(powershellPath)
+ .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command')
+ .arg(command);
+ }
+ else {
+ let scriptPath = path.join(this.getCurrentDir(), 'externals', 'get-os-distro.sh');
+ this.setFileAttribute(scriptPath, "777");
- try {
- console.log(tl.loc("DetectingPlatform"));
- if (tl.osType().match(/^Win/)) {
- let escapedScript = path.join(this.getCurrentDir(), 'externals', 'get-os-platform.ps1').replace(/'/g, "''");
- let command = `& '${escapedScript}'`
+ scriptRunner = tl.tool(tl.which(scriptPath, true));
+ }
- let powershellPath = tl.which('powershell', true);
- scriptRunner = tl.tool(powershellPath)
- .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command')
- .arg(command);
- }
- else {
- let scriptPath = path.join(this.getCurrentDir(), 'externals', 'get-os-distro.sh');
- this.setFileAttribute(scriptPath, "777");
+ let result: trm.IExecSyncResult = scriptRunner.execSync();
- scriptRunner = tl.tool(tl.which(scriptPath, true));
- }
+ if (result.code != 0) {
+ throw tl.loc("getMachinePlatformFailed", result.error ? result.error.message : result.stderr);
+ }
- let result: trm.IExecSyncResult = scriptRunner.execSync();
+ let output: string = result.stdout;
- if (result.code != 0) {
- throw tl.loc("getMachinePlatformFailed", result.error ? result.error.message : result.stderr);
- }
+ let index;
+ if ((index = output.indexOf("Primary:")) >= 0) {
+ let primary = output.substr(index + "Primary:".length).split(os.EOL)[0];
+ osSuffix.push(primary);
+ console.log(tl.loc("PrimaryPlatform", primary));
+ }
- let output: string = result.stdout;
+ if ((index = output.indexOf("Legacy:")) >= 0) {
+ let legacy = output.substr(index + "Legacy:".length).split(os.EOL)[0];
+ osSuffix.push(legacy);
+ console.log(tl.loc("LegacyPlatform", legacy));
+ }
- let index;
- if ((index = output.indexOf("Primary:")) >= 0) {
- let primary = output.substr(index + "Primary:".length).split(os.EOL)[0];
- osSuffix.push(primary);
- console.log(tl.loc("PrimaryPlatform", primary));
+ if (osSuffix.length == 0) {
+ throw tl.loc("CouldNotDetectPlatform");
+ }
}
-
- if ((index = output.indexOf("Legacy:")) >= 0) {
- let legacy = output.substr(index + "Legacy:".length).split(os.EOL)[0];
- osSuffix.push(legacy);
- console.log(tl.loc("LegacyPlatform", legacy));
+ catch (ex) {
+ throw tl.loc("FailedInDetectingMachineArch", JSON.stringify(ex));
}
- if (osSuffix.length == 0) {
- throw tl.loc("CouldNotDetectPlatform");
- }
- }
- catch (ex) {
- throw tl.loc("FailedInDetectingMachineArch", JSON.stringify(ex));
+ this.machineOsSuffixes = osSuffix;
}
-
- return osSuffix;
}
private setFileAttribute(file: string, mode: string): void {
@@ -284,9 +289,6 @@ export class DotNetCoreVersionFetcher {
private getCurrentDir(): string {
return __dirname;
}
-
- private channels: Channel[];
- private httpCallbackClient: httpClient.HttpClient;
}
-const DotNetCoreReleasesIndexUrl: string = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json";
\ No newline at end of file
+const DotNetCoreReleasesIndexUrl: string = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json";