This repository has been archived by the owner on Mar 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-package.xml
85 lines (75 loc) · 2.84 KB
/
build-package.xml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
<!--
****************************************
* IMPORTS
****************************************
-->
<Import Project="$(MSBuildProjectDirectory)\build\tools\MSBuildUmbracoTasks\MSBuild.Umbraco.Tasks.Targets" />
<!--
****************************************
* PROPERTIES
****************************************
-->
<PropertyGroup>
<PackageVersion>1.0.0</PackageVersion>
</PropertyGroup>
<PropertyGroup>
<RootDir>$(MSBuildProjectDirectory)</RootDir>
<BuildDir>$(RootDir)\build\output</BuildDir>
<PackageDir>$(RootDir)\..\dist\umbraco-package</PackageDir>
</PropertyGroup>
<!--
****************************************
* TARGETS
****************************************
-->
<!-- CLEAN -->
<Target Name="Clean">
<RemoveDir Directories="$(BuildDir)" Condition="Exists('$(BuildDir)')" />
<RemoveDir Directories="$(PackageDir)" Condition="Exists('$(PackageDir)')" />
<MakeDir Directories="$(BuildDir)" />
<MakeDir Directories="$(PackageDir)" />
</Target>
<!-- COMPILE -->
<Target Name="Compile" DependsOnTargets="Clean">
<MSBuild Projects="$(RootDir)\src\mindrevolution.ContentTracking.csproj" />
</Target>
<!-- PREPAIRE FILES -->
<Target Name="PrepairFiles" DependsOnTargets="Compile">
<ItemGroup>
<BinFiles Include="$(RootDir)\src\bin\Debug\mindrevolution.ContentTracking.dll" />
<AppPluginFiles Include="$(RootDir)\www\App_Plugins\mindrevolution.ContentTracking\*.*" />
<ViewsFiles Include="$(RootDir)\www\Views\Partials\mindrevolution.ContentTracking\*.*" />
<PackageFile Include="$(RootDir)\Package.xml" />
</ItemGroup>
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BuildDir)\bin" />
<Copy SourceFiles="@(AppPluginFiles)" DestinationFolder="$(BuildDir)\App_Plugins\mindrevolution.ContentTracking" />
<Copy SourceFiles="@(ViewsFiles)" DestinationFolder="$(BuildDir)\Views\Partials\mindrevolution.ContentTracking" />
<Copy SourceFiles="@(PackageFile)" DestinationFolder="$(BuildDir)" />
</Target>
<!-- MANIFEST -->
<Target Name="Manifest" DependsOnTargets="PrepairFiles">
<ItemGroup>
<ManifestFiles Include="$(BuildDir)\**\*" Exclude="$(BuildDir)\Package.xml" />
</ItemGroup>
<ReadLinesFromFile File="$(RootDir)\Readme.txt">
<Output TaskParameter="Lines" ItemName="Readme" />
</ReadLinesFromFile>
<ManifestUpdate ManifestFile="$(BuildDir)\Package.xml"
WorkingDirectory="$(BuildDir)"
PackageVersion="$(PackageVersion)"
Readme="@(Readme->'%(Identity)', '%0a%0d')"
Files="@(ManifestFiles)" />
</Target>
<!-- PACKAGE -->
<Target Name="Package" DependsOnTargets="Manifest">
<ItemGroup>
<PackageFiles Include="$(BuildDir)\**\*.*" />
</ItemGroup>
<Package ManifestFile="$(BuildDir)\Package.xml"
WorkingDirectory="$(BuildDir)"
OutputDirectory="$(PackageDir)"
Files="@(PackageFiles)" />
</Target>
</Project>