Skip to content

Commit

Permalink
Merge branch 'master' into az-ps-dynamic-2-3
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-avit authored Mar 1, 2021
2 parents aeeb93f + d708000 commit 5ec560b
Show file tree
Hide file tree
Showing 175 changed files with 4,297 additions and 25,748 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"loc.input.help.flattenFolders": "Flatten the folder structure and copy all files into the specified target folder.",
"loc.input.label.preserveTimestamp": "Preserve Target Timestamp",
"loc.input.help.preserveTimestamp": "Using the original source file, preserve the target file timestamp.",
"loc.input.label.retryCount": "Retry count to copy the file",
"loc.input.help.retryCount": "Specify the retry count to copy the file. It might help to resolve intermittent issues e.g. with UNC target paths on a remote host.",
"loc.messages.FoundNFiles": "found %d files",
"loc.messages.CleaningTargetFolder": "Cleaning target folder: %s",
"loc.messages.FileAlreadyExistAt": "File %s already exist at %s",
Expand Down
8 changes: 6 additions & 2 deletions Tasks/CopyFilesV2/copyfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ let targetFolder: string = tl.getPathInput('TargetFolder', true);
let cleanTargetFolder: boolean = tl.getBoolInput('CleanTargetFolder', false);
let overWrite: boolean = tl.getBoolInput('OverWrite', false);
let flattenFolders: boolean = tl.getBoolInput('flattenFolders', false);
let retryCount: number = parseInt(tl.getInput('retryCount'));
if (isNaN(retryCount) || retryCount < 0) {
retryCount = 0;
}
const preserveTimestamp: boolean = tl.getBoolInput('preserveTimestamp', false);

// normalize the source folder path. this is important for later in order to accurately
Expand Down Expand Up @@ -115,7 +119,7 @@ if (matchedFiles.length > 0) {
}
else { // copy
console.log(tl.loc('CopyingTo', file, targetPath));
tl.cp(file, targetPath);
tl.cp(file, targetPath, undefined, undefined, retryCount);
if (preserveTimestamp) {
try {
const fileStats = tl.stats(file);
Expand Down Expand Up @@ -151,7 +155,7 @@ if (matchedFiles.length > 0) {
fs.chmodSync(targetPath, targetStats.mode | 146);
}

tl.cp(file, targetPath, "-f");
tl.cp(file, targetPath, "-f", undefined, retryCount);
if (preserveTimestamp) {
try {
const fileStats: tl.FsStats = tl.stats(file);
Expand Down
165 changes: 149 additions & 16 deletions Tasks/CopyFilesV2/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 Tasks/CopyFilesV2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "Microsoft Corporation",
"license": "MIT",
"dependencies": {
"azure-pipelines-task-lib": "^2.9.3"
"azure-pipelines-task-lib": "^2.12.2"
}
}
13 changes: 11 additions & 2 deletions Tasks/CopyFilesV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 180,
"Patch": 1
"Minor": 184,
"Patch": 0
},
"releaseNotes": "Match pattern consistency.",
"demands": [],
Expand Down Expand Up @@ -89,6 +89,15 @@
"required": false,
"helpMarkDown": "Using the original source file, preserve the target file timestamp.",
"groupName": "advanced"
},
{
"name": "retryCount",
"type": "string",
"label": "Retry count to copy the file",
"defaultValue": "0",
"required": false,
"helpMarkDown": "Specify the retry count to copy the file. It might help to resolve intermittent issues e.g. with UNC target paths on a remote host.",
"groupName": "advanced"
}
],
"instanceNameFormat": "Copy Files to: $(TargetFolder)",
Expand Down
13 changes: 11 additions & 2 deletions Tasks/CopyFilesV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 180,
"Patch": 1
"Minor": 184,
"Patch": 0
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"demands": [],
Expand Down Expand Up @@ -89,6 +89,15 @@
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.preserveTimestamp",
"groupName": "advanced"
},
{
"name": "retryCount",
"type": "string",
"label": "ms-resource:loc.input.label.retryCount",
"defaultValue": "0",
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.retryCount",
"groupName": "advanced"
}
],
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/GoV0/Strings/resources.resjson/de-de/resources.resjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"loc.friendlyName": "Los",
"loc.friendlyName": "Go",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?linkid=867582)",
"loc.description": "Hiermit wird eine Go-Anwendung abgerufen, erstellt oder getestet oder ein benutzerdefinierter Go-Befehl ausgeführt.",
"loc.instanceNameFormat": "go $(Befehl)",
Expand All @@ -13,4 +13,4 @@
"loc.input.label.workingDirectory": "Arbeitsverzeichnis",
"loc.input.help.workingDirectory": "Das Arbeitsverzeichnis, in dem der Befehl ausgeführt wird. Falls leer, wird der Stamm des Repositorys (für Builds) oder der Artefakte (für Releases) verwendet, dieser entspricht dem Wert von \"$(System.DefaultWorkingDirectory)\".",
"loc.messages.TaskFailedWithError": "Fehler bei Go-Aufgabe: %s"
}
}
2 changes: 1 addition & 1 deletion Tasks/GoV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 4,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/GoV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 4,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
Expand Down
9 changes: 2 additions & 7 deletions Tasks/MSBuildV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"version": {
"Major": 1,
"Minor": 183,
"Patch": 1
"Patch": 2
},
"demands": [
"msbuild"
],
"minimumAgentVersion": "2.182.1",
"minimumAgentVersion": "1.95.0",
"groups": [
{
"name": "advanced",
Expand Down Expand Up @@ -182,11 +182,6 @@
"argumentFormat": ""
}
},
"restrictions": {
"settableVariables": {
"allowed": []
}
},
"messages": {
"RecordProjectDetailsOnlySupportedOnWindows": "`Record Project Details` is only supported on Windows.",
"CreateLogFileOnlySupportedOnWindows": "`Create Log File` is only supported on Windows.",
Expand Down
Loading

0 comments on commit 5ec560b

Please sign in to comment.