-
Notifications
You must be signed in to change notification settings - Fork 4
/
LevelUp.Integrations.TlsPatcher.Installer.build.targets
46 lines (46 loc) · 2.52 KB
/
LevelUp.Integrations.TlsPatcher.Installer.build.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup>
<Target Name="SharedProperties">
<PropertyGroup>
<BuildScriptSourceDir>$(SolutionDir)BuildScripts\</BuildScriptSourceDir>
<BuildScriptSourceDirSignInstaller>$(BuildScriptSourceDir)SignInstaller.ps1</BuildScriptSourceDirSignInstaller>
<BuildTargetFullPath>$(TargetDir)$(TargetName)-$(GitVersion_NuGetVersion)_$(Platform)$(TargetExt)</BuildTargetFullPath>
<DeployTargetDir>$(SolutionDir)artifacts\</DeployTargetDir>
<DeployTargetPath>$(DeployTargetDir)$(TargetName)-$(GitVersion_NuGetVersion)$(TargetExt)</DeployTargetPath>
</PropertyGroup>
</Target>
<Target Name="AddVersionToFilename" DependsOnTargets="SharedProperties" AfterTargets="Build">
<PropertyGroup>
<PsAddVersionToFilename>"Move-Item '$(TargetPath)' '$(BuildTargetFullPath)' -force"</PsAddVersionToFilename>
</PropertyGroup>
<Exec Command="powershell -Command $(PsAddVersionToFilename)" />
</Target>
<Target Name="CopyToDeploymentFolder" DependsOnTargets="SharedProperties" AfterTargets="AddVersionToFilename">
<Message Text="Copying installer to $(DeployTargetDir)" Importance="High" />
<PropertyGroup>
<PsCopyToDeploymentFolderCreateDir>"if (!(Test-Path -path '$(DeployTargetDir)')) {New-Item '$(DeployTargetDir)' -Type Directory}"</PsCopyToDeploymentFolderCreateDir>
<PsCopyToDeploymentFolderCopyFile>"Copy-Item '$(BuildTargetFullPath)' '$(DeployTargetDir)' -recurse -force"</PsCopyToDeploymentFolderCopyFile>
</PropertyGroup>
<Exec Command="powershell -Command $(PsCopyToDeploymentFolderCreateDir)" />
<Exec Command="powershell -Command $(PsCopyToDeploymentFolderCopyFile)" />
</Target>
<!-- Clean Event: Deployment: Remove file -->
<Target Name="CleanDeploymentFolder" DependsOnTargets="SharedProperties" AfterTargets="AfterClean">
<Delete Files="$(DeployTargetPath)" />
<Message Text="Deleted $(DeployTargetPath)" Importance="High" />
</Target>
</Project>