From e4e7e795b968475050ca1f799d1c02da97a49c8b Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 2 Nov 2020 11:27:24 -0800 Subject: [PATCH 1/5] Add use mini match parameter to allow recursion. --- EsrpSign.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/EsrpSign.yml b/EsrpSign.yml index 2b9934c..4f44e4f 100644 --- a/EsrpSign.yml +++ b/EsrpSign.yml @@ -7,6 +7,8 @@ parameters: default: "CP-230012" - name: "pattern" default: "*.dll,*.exe" + - name: "useMinimatch" + default: "false" steps: - task: UseDotNet@2 @@ -54,7 +56,8 @@ steps: signConfigType: inlineSignParams inlineOperation: $(EsrpJson) Pattern: ${{ parameters.pattern }} - condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], '')) + UseMinimatch: ${{ parameters.useMinimatch }} + condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], '')) timeoutInMinutes: 30 - pwsh: | From 357a8cfe10ebc2b14b8621031417137c1341b12a Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 2 Nov 2020 11:33:08 -0800 Subject: [PATCH 2/5] remove duplicate input --- EsrpSign.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/EsrpSign.yml b/EsrpSign.yml index 4f44e4f..3dc6d3a 100644 --- a/EsrpSign.yml +++ b/EsrpSign.yml @@ -52,7 +52,6 @@ steps: inputs: ConnectedServiceName: pwshSigning FolderPath: '${{ parameters.buildOutputPath }}' - UseMinimatch: false signConfigType: inlineSignParams inlineOperation: $(EsrpJson) Pattern: ${{ parameters.pattern }} From 9efc1b663b33e70f53291fdd7cece25040ff82d8 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 2 Nov 2020 11:34:36 -0800 Subject: [PATCH 3/5] fix condition --- EsrpSign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EsrpSign.yml b/EsrpSign.yml index 3dc6d3a..873a508 100644 --- a/EsrpSign.yml +++ b/EsrpSign.yml @@ -56,7 +56,7 @@ steps: inlineOperation: $(EsrpJson) Pattern: ${{ parameters.pattern }} UseMinimatch: ${{ parameters.useMinimatch }} - condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], '')) + condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], '')) timeoutInMinutes: 30 - pwsh: | From 81a3267c38a4006a3d150f968330d2d7ace00fc6 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 2 Nov 2020 11:41:02 -0800 Subject: [PATCH 4/5] add minimatch example --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8a149b2..42871bb 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,9 @@ Details can be found in the PowerShell Maintainers teams channel's Wiki tab. certificateId: "CP-230012" # the file pattern to use, comma separated pattern: '*.dll,*.psd1,*.psm1,*.ps1xml,*.mof' + # decides if the task should use minimatch for the pattern matching. + # https://github.com/isaacs/minimatch#features + useMinimatch: false ``` From 6bc276f9a4828a1275c75186006f5cf9b4575307 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 2 Nov 2020 11:50:52 -0800 Subject: [PATCH 5/5] expand on minimatch syntax --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42871bb..2e36e97 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,10 @@ Details can be found in the PowerShell Maintainers teams channel's Wiki tab. signOutputPath: $(signOutPath) # the certificate ID to use certificateId: "CP-230012" - # the file pattern to use, comma separated + # The file pattern to use + # If not using minimatch: comma separated, with * supported + # If using minimatch: newline separated, with !, **, and * supported. + # See link in the useMinimatch comments. pattern: '*.dll,*.psd1,*.psm1,*.ps1xml,*.mof' # decides if the task should use minimatch for the pattern matching. # https://github.com/isaacs/minimatch#features