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

Clean up Copy Files over SSH #7464

Merged
merged 16 commits into from
Jun 22, 2018
Merged

Conversation

brcrista
Copy link
Contributor

@brcrista brcrista commented Jun 13, 2018

Doing this separate from #7459 to keep the change smaller

  • Run VS Code formatting
  • var -> const or let
  • use for-of instead of index manipulation

Testing
https://buildcanary.visualstudio.com/CanaryBuilds/_apps/hub/ms.vss-ciworkflow.build-ci-hub?_a=edit-build-definition&id=457

@brcrista brcrista requested a review from madhurig June 20, 2018 20:50
Copy link
Contributor

@madhurig madhurig left a comment

Choose a reason for hiding this comment

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

How about task.json update?

// This method will find the list of matching files for the specified contents
// This logic is the same as the one used by CopyFiles task except for allowing dot folders to be copied
// This will be useful to put in the task-lib
function getFilesToCopy(sourceFolder, contents: string[]): string[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic was moved to the vsts-task-lib. Since you are updating, it is a good idea to delete all this and simply use the lib methods the way CopyFiles does now: https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/CopyFilesV2/copyfiles.ts#L20

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like the two work a little differently right now, so this will be a behavior change: https://buildcanary.visualstudio.com/CanaryBuilds/CanaryBuilds%20Team/_build/results?buildId=71763&view=logs

Copy link
Contributor

Choose a reason for hiding this comment

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

ok lets leave that change for a major update then!

@brcrista
Copy link
Contributor Author

I can update the task.json. I had originally done this change at the same time as the bug fix which is why I didn't bump the version.

@brcrista brcrista merged commit 00af216 into master Jun 22, 2018
@brcrista brcrista deleted the users/brcrista/copyfilesoverssh-cleanup branch September 19, 2018 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants