Skip to content

Commit

Permalink
Apgrade to azure-pipelines-tasklib 4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jessehouwing committed Aug 29, 2023
1 parent 6d93a73 commit 0181daf
Show file tree
Hide file tree
Showing 28 changed files with 60 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ BuildTasks/*Extension*/common.ts
/BuildTasks/PublishExtension/debug.cmd
/BuildTasks/IsValidExtensionAgent/debug.cmd
*.env
BuildTasks/*/v*/**/*.js
BuildTasks/*/v*/**/*.js.map
7 changes: 4 additions & 3 deletions BuildTasks/Common/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/Common/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"tmp": "^0.2.1",
"uuidv5": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion BuildTasks/ExtensionVersion/v4/ExtensionVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function run() {
const outputStream = new common.TfxJsonOutputStream(console.log);
const errorStream = new common.TfxJsonOutputStream(tl.error);

const code: number = await tfx.exec(<any>{ outStream: outputStream, errorStream: errorStream, failOnStdErr: false, ignoreReturnCode: false } as tr.IExecOptions);
const code: number = await tfx.execAsync(<any>{ outStream: outputStream, errorStream: errorStream, failOnStdErr: false, ignoreReturnCode: false } as tr.IExecOptions);
if (code !== 0)
{
throw `tfx exited with return code: ${code}`
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/ExtensionVersion/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/ExtensionVersion/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"tmp": "^0.2.1",
"uuidv5": "^1.0.0"
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/InstallExtension/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/InstallExtension/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"tmp": "^0.2.1",
"uuidv5": "^1.0.0"
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/IsValidExtensionAgent/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/IsValidExtensionAgent/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"promise-retry": "^2.0.1",
"tmp": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion BuildTasks/PackageExtension/v4/PackageExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function run() {
await common.checkUpdateTasksManifests();
const outputStream = new common.TfxJsonOutputStream(console.log);

const code = await tfx.exec(<any>{ outStream: outputStream, failOnStdErr: false });
const code = await tfx.execAsync(<any>{ outStream: outputStream, failOnStdErr: false });
if (code !== 0)
{
throw `tfx exited with return code: ${code}`
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/PackageExtension/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/PackageExtension/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"tmp": "^0.2.1",
"uuidv5": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion BuildTasks/PublishExtension/v4/PublishExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void common.runTfx(async tfx => {
const outputStream = new common.TfxJsonOutputStream(console.log);
const errorStream = new common.TfxJsonOutputStream(tl.error);

const code = await tfx.exec({ outStream: outputStream, errorStream: errorStream, failOnStdErr: false } as any);
const code = await tfx.execAsync({ outStream: outputStream, errorStream: errorStream, failOnStdErr: false } as any);
if (code !== 0)
{
throw `tfx exited with return code: ${code}`
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/PublishExtension/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/PublishExtension/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@xmldom/xmldom": "^0.8.10",
"7zip-bin-win": "^2.2.0",
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"core-js": "^3.32.1",
"fs-extra": "^11.1.1",
"temp": "^0.9.4",
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/PublishVSExtension/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/PublishVSExtension/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"keywords": [],
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"core-js": "^3.32.1",
"path": "~0.12.7",
"tmp": "^0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion BuildTasks/ShareExtension/v4/ShareExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void common.runTfx(async tfx => {
tfx.arg(["--share-with"].concat(accounts).map((value) => { return value.trim(); }));

try{
const code = await tfx.exec();
const code = await tfx.execAsync();
tl.setResult(tl.TaskResult.Succeeded, `tfx exited with return code: ${code}`);
} catch (err)
{
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/ShareExtension/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/ShareExtension/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"tmp": "^0.2.1",
"uuidv5": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion BuildTasks/TfxInstaller/v4/TfxInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function run()
const checkLatest = taskLib.getBoolInput("checkLatest", false) || false;

await getTfx(version, checkLatest);
await taskLib.tool("tfx").arg(["version", "--no-color"]).exec();
await taskLib.tool("tfx").arg(["version", "--no-color"]).execAsync();
}
catch (error) {
taskLib.setResult(taskLib.TaskResult.Failed, error.message);
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/TfxInstaller/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/TfxInstaller/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"azure-pipelines-tool-lib": "^2.0.4",
"tmp": "^0.2.1"
}
Expand Down
7 changes: 4 additions & 3 deletions BuildTasks/UnpublishExtension/v4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTasks/UnpublishExtension/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^4.4.0",
"azure-pipelines-task-lib": "^4.5.0",
"fs-extra": "^11.1.1",
"tmp": "^0.2.1",
"uuidv5": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions foreach-task.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(Get-ChildItem buildtasks\*\v*) | ForEach-Object{
(Get-ChildItem buildtasks\*\v4) | ForEach-Object{
write-host $_
Push-Location $_
& npm audit fix
& npm install azure-pipelines-task-lib@4 --save
Pop-Location
}
2 changes: 1 addition & 1 deletion test-packaging.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set INPUT_UPDATETASKSID=true
set INPUT_UPDATETASKSVERSION=true
set INPUT_UPDATETASKSVERSIONTYPE=minor
set INPUT_PATTERNMANIFEST=vss-extension*.json
pushd BuildTasks\PackageExtension\PackageExtension
pushd BuildTasks\PackageExtension\v4\PackageExtension\v4
rem c:\TfsData\jessehouwing\externals.2.111.1\node\bin\node.exe PackageExtension.js
rem c:\TfsData\jessehouwing\externals.2.136.1\node\bin\node.exe PackageExtension.js
node PackageExtension.js
Expand Down

0 comments on commit 0181daf

Please sign in to comment.