dotnet / sign

Code Signing CLI tool supporting Authenticode, NuGet, VSIX, and ClickOnce
MIT License
439 stars 84 forks source link

Allow specifying multiple space separated files to sign #685

Closed Daniel-Svensson closed 3 weeks ago

Daniel-Svensson commented 1 month ago

Is your feature request related to a problem? Please describe.

I want to use dotnet sign to batch sign files when using velopack installer. That means that it must support multiple files one after each other on the command prompt (space separated)

Based on the current helt sign code azure-key-vault <file(s)> [options] i expected that I could just specify several files after each other, but it does not work and I get Unrecognized command or argument '"file2.exe"'. when I specify more that 1 file

Describe the solution you'd like A clear and concise description of what you want to happen.

I want to be able to call dotnet sign using the following syntax sign code azure-key-vault "file1" "file2.exe" "file3.exe" --option1 sign code azure-key-vault --option1 file1 file 2 file3

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

don't do batch signing, use another tool

Additional context Include the output of sign --version. Add any other context about the problem here.

dotnet sign --version
0.9.1-beta.24170.3+394fc50bebb3ddaa3f79fc975f552d4ea2787552

It seems dotnet sign uses System.CommandLine? if so then according to the documentation it might be possible to set Option.AllowMultipleArgumentsPerToken to true for the files argument.

clairernovotny commented 3 weeks ago

Sign CLI already supports globs; this can be done today with a glob pattern like *.exe or any other standard glob pattern.

dtivel commented 3 weeks ago

If this is still an issue, please reactivate with additional detail.