forked from Aeroluna/Heck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
24 lines (24 loc) · 1.41 KB
/
Directory.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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--Original target only runs on "Release" configuration, this is modified to look for the "RELEASE" constant instead-->
<PropertyGroup>
<DisableZipRelease>false</DisableZipRelease>
</PropertyGroup>
<Target Name="Modified_ZipRelease" AfterTargets="Build" DependsOnTargets="BSMT_AfterBuild;CopyToArtifactDestination" Condition="'$(DefineConstants.Contains(RELEASE))'">
<Message Text="Target: Modified_ZipRelease" Importance="high"/>
<PropertyGroup>
<!--Set 'ArtifactName' if it failed before.-->
<ArtifactName Condition="'$(ArtifactName)' == ''">$(AssemblyName)</ArtifactName>
<ZipDestinationDirectory>$(OutDir)zip\</ZipDestinationDirectory>
<ZipDestinationFile>$(ZipDestinationDirectory)$(ArtifactName).zip</ZipDestinationFile>
</PropertyGroup>
<Message Text=" Output Properties:" Importance="high"/>
<Message Text=" ZipDestinationDirectory= '$(ZipDestinationDirectory)'" Importance="high"/>
<Message Text=" ZipDestinationFile= '$(ZipDestinationFile)'" Importance="high"/>
<ItemGroup>
<OldZips Include="$(ZipDestinationDirectory)$(AssemblyName)*.zip"/>
</ItemGroup>
<Delete Files="@(OldZips)" TreatErrorsAsWarnings="true" ContinueOnError="true"/>
<ZipDir SourceDirectory="$(ArtifactDestination)" DestinationFile="$(ZipDestinationDirectory)$(ArtifactName).zip" MessagePrefix=" "/>
</Target>
</Project>