-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathSmartStoreNET.Dev.proj
More file actions
96 lines (83 loc) · 4.55 KB
/
SmartStoreNET.Dev.proj
File metadata and controls
96 lines (83 loc) · 4.55 KB
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
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="utf-8" ?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildProjectDirectory)\SmartStoreNET.Tasks.Targets"/>
<PropertyGroup>
<StagePluginsFolder>$(StageFolder)\Plugins</StagePluginsFolder>
<PluginName></PluginName>
<PluginTarget></PluginTarget>
<!-- Change to your theme name -->
<ThemeName>CMS</ThemeName>
</PropertyGroup>
<Target Name="PreDeploy">
<CallTarget Targets="Clean"/>
<CallTarget Targets="Compile"/>
<CallTarget Targets="Stage"/>
</Target>
<Target Name="DeployWithPlugins" DependsOnTargets="PreDeploy">
<CreateItem Include="$(MSBuildProjectDirectory)\..\">
<Output ItemName="MSBuildProjectParentDirectory" TaskParameter="Include"/>
</CreateItem>
<Message Text="%(MSBuildProjectParentDirectory.Fullpath)"/>
<CreateProperty Value="%(MSBuildProjectParentDirectory.Fullpath)">
<Output PropertyName="CodeFolder" TaskParameter="Value"/>
</CreateProperty>
<ItemGroup>
<CommercialPlugins Include="$(CodeFolder)\commercial-plugins\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(CommercialPlugins)" DestinationFolder="$(BuildFolder)\Web\Plugins\%(RecursiveDir)" />
<Delete Files="$(BuildFolder)\Web\Plugins\create-symlinks.bat" />
</Target>
<Target Name="DeployWithPluginsZip" DependsOnTargets="DeployWithPlugins">
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="ZipDirectory=$(ZipDirectory); ZipFileSuffix=.Full" Targets="Package-Zip" />
</Target>
<Target Name="DeployTheme" DependsOnTargets="DeployFull" Condition=" '$(ThemeName)' != '' ">
<!-- move theme content -->
<ItemGroup>
<ThemeFiles Include="$(WebThemesFolder)\$(ThemeName)\preview.png" />
<ThemeFiles Include="$(WebThemesFolder)\$(ThemeName)\theme.config" />
<ThemeFolderViews Include="$(WebThemesFolder)\$(ThemeName)\Views\**\*.*" />
<ThemeFolderContent Include="$(WebThemesFolder)\$(ThemeName)\Content\**\*.*" />
<ThemeFolderScripts Include="$(WebThemesFolder)\$(ThemeName)\Scripts\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(ThemeFiles)" DestinationFolder="$(BuildFolder)\Web\Themes\$(ThemeName)\" />
<Copy SourceFiles="@(ThemeFolderViews)" DestinationFolder="$(BuildFolder)\Web\Themes\$(ThemeName)\Views\%(RecursiveDir)" />
<Copy SourceFiles="@(ThemeFolderContent)" DestinationFolder="$(BuildFolder)\Web\Themes\$(ThemeName)\Content\%(RecursiveDir)" />
<Copy SourceFiles="@(ThemeFolderScripts)" DestinationFolder="$(BuildFolder)\Web\Themes\$(ThemeName)\Scripts\%(RecursiveDir)" />
<Copy SourceFiles="@(ThemeFolderResources)" DestinationFolder="$(BuildFolder)\Web\Themes\$(ThemeName)\_Resources\%(RecursiveDir)" />
<!-- If you have created a theme project uncomment the following lines -->
<!-- move theme dll to bin -->
<!--
<MSBuild Projects="$(WebFolder)\Themes\$(ThemeName)\SmartStore.Themes.$(ThemeName).csproj"
Targets="_CopyWebApplication"
Properties="WebProjectOutputDir=$(StageFolder)\Themes\$(ThemeName)\;
OutDir=$(StageFolder)\Themes\$(ThemeName)\bin\;Configuration=$(Configuration)" />
<CreateItem Include="$(StageFolder)\Themes\$(ThemeName)\bin\*.dll">
<Output TaskParameter="Include" ItemName="ThemeCompileOutput" />
</CreateItem>
<Copy SourceFiles="@(ThemeCompileOutput)" DestinationFolder="$(StageFolder)\bin\" />
-->
<!-- move theme depedencies to bin -->
<!--
<ItemGroup>
<CommonMarkDll Include="$(SrcFolder)\packages\CommonMark.NET.0.15.1\lib\net45\**\*.dll"/>
</ItemGroup>
<Copy SourceFiles="@(CommonMarkDll)" DestinationFolder="$(StageFolder)\bin\" />
-->
<!-- delete \bin in SmartStore.Theme -->
<!--
<RemoveDir Directories="$(StageFolder)\Themes\$(ThemeName)\bin\" />
-->
</Target>
<Target Name="DeployThemeZip" DependsOnTargets="DeployTheme">
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="ZipDirectory=$(ZipDirectory); ZipFileSuffix=.Full" Targets="Package-Zip" />
</Target>
<Target Name="MovePlugin">
<ItemGroup>
<PluginFiles Include="$(StagePluginsFolder)\$(PluginName)\**\*.*" />
</ItemGroup>
<!-- Copy the plugin to the target parent (e.g. Premium or Additional) -->
<Copy SourceFiles="@(PluginFiles)" DestinationFolder="$(BuildFolder)\$(PluginTarget)\$(PluginName)\%(RecursiveDir)" />
<!-- After copying we have to remove the plugin from the stage folder -->
<RemoveDir Directories="$(StagePluginsFolder)\$(PluginName)" Condition="$(StagePluginsFolder)!=''" />
</Target>
</Project>