deployment-tools
deployment-tools copied to clipboard
removed `algorithm` option.
Fixes #37
Removed redundant command line parameter and function argument. The msbuild task utility APIs assume SHA1 as a default contrary to what xml-doc comments say: https://github.com/dotnet/msbuild/blob/d1f5a8af82872bafadb82227ec99f2fcd7b731ec/src/Tasks/ManifestUtil/Util.cs#L226 https://github.com/dotnet/msbuild/blob/518c041f4511a6bc23eb40703b69a94ea46c65fd/src/Tasks/ManifestUtil/ManifestWriter.cs#L105
Thus I'm passing in a hard-coded version string.
Testing: update application manifest:
C:\work\test>D:\deployment-tools\artifacts\bin\MageCLI\Debug\net6.0\dotnet-mage.exe -u files\test.manifest -fd files
test.manifest successfully updated
C:\work\test>findstr sha files\test.manifest
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
C:\work\test>
update deployment manifest:
C:\work\test>D:\deployment-tools\artifacts\bin\MageCLI\Debug\net6.0\dotnet-mage.exe -u test.applicaiton
test.applicaiton successfully updated
C:\work\test>findstr sha test.applicaiton
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
C:\work\test>
##Question: How do you guys build this repo? I built from Dev17 dev prompt but I got errors even when building clickonce, though the tool was produced successfully. Could not build it from Dev16 of cause because .NET7 is not supported.
We didn't want to remove this, to not break customers that specify algorithm on command line in their existing automations. The benefit of keeping the switch is to enable new algorithms in the future.
SHA256 is already hard-coded in dotnet-mage and is the only allowed algorithm: https://github.com/dotnet/deployment-tools/blob/4c51edf694fe99622fdcf77a1906c59e14dd311d/src/clickonce/MageCLI/Command.cs#L602-L616
I saw your comment in the bug that you agreed that this is a usability issue, having parameter that is ignored. Given that you had changed the name of the tool recently, this is a less breaking change. Also this code is extra hacky, we are converting algorithm to an irrelevant framework version, this bothers me.
[Triage] Stale - this is a take back which introduces risk. Customers would be affected by removal of algorithm option, and this would also prevent potential expansion to support new algorithms.