Normalize signing command-line
Rob Mensching committed
Jan 26, 2024 at 00:57 UTC
626f5c6b4b0395a831fda0f08893b88a745f6915
1 file changed
+8
-9
src/Directory.Build.targets
+8
-9
@@ -3,10 +3,9 @@
3
4
<Project>
5
<PropertyGroup>
6
- <SigningToolFolder>$(ToolsFolder)</SigningToolFolder>
7
- <SigningToolExe>$(SigningToolFolder)\sign.exe</SigningToolExe>
8
- <SigningFilelist>$(MSBuildThisFileDirectory)signing-empty-file-list.txt</SigningFilelist>
9
- <SigningConfiguration>--description "WiX Toolset" --description-url "https://wixtoolset.org/" --timestamp-url "http://timestamp.digicert.com" --file-list "$(SigningFilelist)" --azure-key-vault-managed-identity true --azure-key-vault-url "$(SigningVaultUri)" --azure-key-vault-certificate "$(SigningCertName)"</SigningConfiguration>
6
+ <SigningToolExe>$(ToolsFolder)\sign.exe</SigningToolExe>
7
+ <SigningCommand>code azure-key-vault</SigningCommand>
8
+ <SigningConfiguration>--description "WiX Toolset" --description-url "https://wixtoolset.org/" --timestamp-url "http://timestamp.digicert.com" --file-list "$(MSBuildThisFileDirectory)signing-empty-file-list.txt" --azure-key-vault-managed-identity true --azure-key-vault-url "$(SigningVaultUri)" --azure-key-vault-certificate "$(SigningCertName)"</SigningConfiguration>
9
</PropertyGroup>
10
11
<PropertyGroup Condition=" '$(IsWixTestSupportProject)'=='true' ">
@@ -114,12 +113,12 @@
113
</Target>
114
115
<Target Name="SignOutput" AfterTargets="AfterBuild"
117
- Condition=" '$(SigningCertName)'!='' and '$(SignOutput)'!='false' and
116
+ Condition=" '$(SigningCertName)'!='' and '$(SignOutput)'!='false' and
117
('$(MSBuildProjectExtension)'=='.csproj' or ('$(MSBuildProjectExtension)'=='.vcxproj' and '$(ConfigurationType)'!='StaticLibrary'))">
118
119
<Message Importance="high" Text="Signing file: $(TargetPath)" />
120
122
- <Exec Command='"$(SigningToolExe)" code azure-key-vault $(TargetPath) $(SigningConfiguration)'
121
+ <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) $(TargetPath)'
122
WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
123
</Target>
124
@@ -131,21 +130,21 @@
130
131
<Message Importance="high" Text="Signing nupkg: @(SigningNupkgs->'%(Identity)')" />
132
134
- <Exec Command='"$(SigningToolExe)" code azure-key-vault "@(SigningNupkgs->'%(Identity)')" $(SigningConfiguration)'
133
+ <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) "@(SigningNupkgs->'%(Identity)')"'
134
WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
135
</Target>
136
137
<Target Name="SignBundleEngine" Condition=" '$(SigningCertName)'!='' and '$(SignOutput)'!='false' ">
138
<Message Importance="high" Text="Signing bundle engine: @(SignBundleEngine->'%(Identity)')" />
139
141
- <Exec Command='"$(SigningToolExe)" code azure-key-vault "@(SignBundleEngine->'%(Identity)')" $(SigningConfiguration)'
140
+ <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) "@(SignBundleEngine->'%(Identity)')"'
141
WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
142
</Target>
143
144
<Target Name="SignBundle" Condition=" '$(SigningCertName)'!='' and '$(SignOutput)'!='false' ">
145
<Message Importance="high" Text="Signing bundle: @(SignBundle->'%(Identity)')" />
146
148
- <Exec Command='"$(SigningToolExe)" code azure-key-vault "@(SignBundle->'%(Identity)')" $(SigningConfiguration)'
147
+ <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) "@(SignBundle->'%(Identity)')"'
148
WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
149
</Target>
150