forked from Amebis/eduVPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Resources.targets
24 lines (21 loc) · 1.11 KB
/
Resources.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="utf-8"?>
<!--
eduVPN - VPN for education and research
Copyright: 2017-2020 The Commons Conservancy eduVPN Programme
SPDX-License-Identifier: GPL-3.0+
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Code signing
-->
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' AND '$(Configuration)'=='Release'" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Exec Command="signtool.exe sign /sha1 "$(ManifestCertificateThumbprint)" /fd sha256 /as /tr "$(ManifestTimestampRFC3161Url)" /td sha256 /q "$(TargetPath)"" />
<Touch Files="$(OutDir)$(TargetName).sign" AlwaysCreate="true" />
</Target>
<PropertyGroup Condition="'$(ManifestCertificateThumbprint)' != '' AND '$(Configuration)' == 'Release'">
<CleanDependsOn>CleanSign;$(CleanDependsOn)</CleanDependsOn>
</PropertyGroup>
<Target Name="CleanSign">
<Delete Files="$(OutDir)$(TargetName).sign"/>
</Target>
</Project>