-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
#893187 - support multiple dSYMs upload #3580
Conversation
Hi @AlexRukhlin, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
} | ||
}) | ||
} else { | ||
let simbolsFile = utils.resolveSinglePath(symbolsPathPattern, continueIfSymbolsNotFound, packParentFolder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"simbolsFile" -> "symbolsFile"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I added a minor comment and another important consideration about supporting backslashes on Windows.
Tasks/VSMobileCenterUpload/utils.ts
Outdated
if (pattern) { | ||
let matches: string[] = tl.glob(pattern); | ||
let matches = tl.glob(pattern); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove type info (: string[]
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type is defined by the right side of assignment.
Tasks/VSMobileCenterUpload/utils.ts
Outdated
|
||
return commonParent.join("/"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also support Windows-style paths with backslashes ("")?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we do not need that. Paths processed in this method always have forward slashes (even in Windows).
Tasks/VSMobileCenterUpload/utils.ts
Outdated
export function removeDuplicates(list: string[]): string[] { | ||
let unique: string[] = []; | ||
|
||
list.forEach(s => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested, not sure if works. Arrays in JavaScript are associative arrays, I think we can avoid the "find" call if you just push each element in list as a key in the array, and get all unique values from Object.keys(array)
call. Again I didn't test this yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> a
[ 'a/b', 'b', 'a', 'a/b' ]
> b = []
[]
> a.forEach(function(s) {b[s] = 1})
undefined
> Object.keys(b)
[ 'a/b', 'b', 'a' ]
Seems working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -6,7 +6,7 @@ import fs = require('fs'); | |||
|
|||
import { ToolRunner } from 'vsts-task-lib/toolrunner'; | |||
|
|||
var utils = require('./utils.js'); | |||
import utils = require('./utils'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some problem mocking this if it's "import"ed. You can try and see if mock works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
let dsymPaths = utils.resolvePaths(symbolsPathPattern, continueIfSymbolsNotFound, packParentFolder); | ||
|
||
dsymPaths.forEach(dsymFolder => | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The opening brace should be on the same line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
6ee3633
to
df3f902
Compare
df3f902
to
4caeec7
Compare
No description provided.