Skip to content

Commit 1fed324

Browse files
authored
added warning message to cli v5 tasks (#340)
1 parent 09fd7da commit 1fed324

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { OctoServerConnectionDetails } from "../../Utils/connection";
22
import { executeTask } from "../../Utils/octopusTasks";
33
import { OctopusToolRunner } from "../../Utils/tool";
4+
import * as tasks from "azure-pipelines-task-lib";
45

56
export class OctoCli {
67
constructor(readonly tool: OctopusToolRunner, readonly command: string, readonly connection: OctoServerConnectionDetails) {}
78

89
public async run(args: string | undefined) {
910
this.tool.arg(this.command);
11+
tasks.warning("This task is using a deprecated version of the Octopus CLI, we recommend using the latest version.");
1012
await executeTask(this.tool, "(cli;run;v5)", this.connection, "Succeeded executing octo command.", "Failed to execute octo command.", args);
1113
}
1214
}

source/tasks/OctoInstaller/OctoInstallerV5/installer.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class Installer {
1515
public async run(versionSpec: string) {
1616
await executeWithSetResult(
1717
async () => {
18+
tasks.warning("This task is using a deprecated version of the Octopus CLI, we recommend using the latest version.");
1819
const endpoint = await new DownloadEndpointRetriever(this.octopurlsUrl).getEndpoint(versionSpec);
1920
let toolPath = tools.findLocalTool(TOOL_NAME, endpoint.version);
2021

0 commit comments

Comments
 (0)