2010-02-07 12:10:12 +08:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2010-07-19 03:21:36 +08:00
|
|
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2010-02-07 12:10:12 +08:00
|
|
|
|
2010-07-13 11:16:34 +08:00
|
|
|
<!-- Initialization -->
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<LibFolder>$(MSBuildProjectDirectory)\lib</LibFolder>
|
|
|
|
<SrcFolder>$(MSBuildProjectDirectory)\src</SrcFolder>
|
|
|
|
<BuildFolder>$(MSBuildProjectDirectory)\build</BuildFolder>
|
2010-07-20 06:41:14 +08:00
|
|
|
<MsBuildTasksFolder>$(MSBuildProjectDirectory)\buildtasks</MsBuildTasksFolder>
|
2010-07-20 05:35:33 +08:00
|
|
|
<ArtifactsFolder>$(MSBuildProjectDirectory)\artifacts</ArtifactsFolder>
|
2010-07-17 03:56:10 +08:00
|
|
|
<SqlCeFolder>$(MSBuildProjectDirectory)\lib\sqlce</SqlCeFolder>
|
2010-07-20 05:35:33 +08:00
|
|
|
<SourceArtifactFolder>$(ArtifactsFolder)\Source</SourceArtifactFolder>
|
|
|
|
<MsDeployArtifactFolder>$(ArtifactsFolder)\MsDeploy</MsDeployArtifactFolder>
|
2010-07-17 05:22:38 +08:00
|
|
|
<ModulesSrcFolder>$(MSBuildProjectDirectory)\src\Orchard.Web\Modules</ModulesSrcFolder>
|
2010-10-20 15:07:53 +08:00
|
|
|
<ThemesSrcFolder>$(MSBuildProjectDirectory)\src\Orchard.Web\Themes</ThemesSrcFolder>
|
2010-07-13 11:16:34 +08:00
|
|
|
|
|
|
|
<CompileFolder>$(BuildFolder)\Compile</CompileFolder>
|
|
|
|
<WebSitesFolder>$(CompileFolder)\_PublishedWebsites</WebSitesFolder>
|
|
|
|
<StageFolder>$(BuildFolder)\Stage</StageFolder>
|
2010-07-17 03:56:10 +08:00
|
|
|
<MsDeployFolder>$(BuildFolder)\MsDeploy</MsDeployFolder>
|
2010-07-13 11:16:34 +08:00
|
|
|
<ProfilingFolder>$(BuildFolder)\Profiling</ProfilingFolder>
|
|
|
|
|
|
|
|
<BuildPlatform Condition="$(ProgramW6432) != ''">x64</BuildPlatform>
|
|
|
|
<BuildPlatform Condition="$(BuildPlatform) == ''">x86</BuildPlatform>
|
2010-07-20 04:38:35 +08:00
|
|
|
|
|
|
|
<!-- TeamCity build number -->
|
|
|
|
<Version>$(BUILD_NUMBER)</Version>
|
2010-07-13 11:16:34 +08:00
|
|
|
</PropertyGroup>
|
2010-02-07 12:10:12 +08:00
|
|
|
|
2010-02-07 12:35:45 +08:00
|
|
|
<Import Project="$(LibFolder)\msbuild\MSBuild.Community.Tasks.Targets"/>
|
|
|
|
|
2010-07-13 11:16:34 +08:00
|
|
|
<!-- Coordinating Targets -->
|
2010-02-07 12:10:12 +08:00
|
|
|
|
|
|
|
<Target Name ="Build">
|
|
|
|
<CallTarget Targets="Clean"/>
|
|
|
|
<CallTarget Targets="Compile"/>
|
2010-02-07 13:20:38 +08:00
|
|
|
<CallTarget Targets="Test"/>
|
2010-02-07 12:35:45 +08:00
|
|
|
<CallTarget Targets="Package"/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="Package">
|
|
|
|
<CallTarget Targets="Package-Stage"/>
|
2010-07-17 03:56:10 +08:00
|
|
|
<CallTarget Targets="Package-MsDeploy"/>
|
2010-02-07 12:35:45 +08:00
|
|
|
<CallTarget Targets="Package-Zip"/>
|
2010-02-07 12:10:12 +08:00
|
|
|
</Target>
|
|
|
|
|
2010-05-07 03:53:27 +08:00
|
|
|
<Target Name="Profiling">
|
|
|
|
<CallTarget Targets="Clean"/>
|
|
|
|
<CallTarget Targets="Compile"/>
|
|
|
|
<CallTarget Targets="Package-Stage"/>
|
|
|
|
<CallTarget Targets="Profiling-Stage"/>
|
|
|
|
<CallTarget Targets="Profiling-Setup"/>
|
|
|
|
</Target>
|
|
|
|
|
2010-02-07 12:10:12 +08:00
|
|
|
|
2010-07-13 11:16:34 +08:00
|
|
|
<!-- Building -->
|
2010-02-07 12:35:45 +08:00
|
|
|
|
2010-07-13 11:16:34 +08:00
|
|
|
<Target Name="Clean">
|
|
|
|
<MSBuild Projects="$(SrcFolder)\Orchard.sln" Targets="Clean" />
|
|
|
|
<RemoveDir Directories="$(BuildFolder)" />
|
2010-07-20 05:35:33 +08:00
|
|
|
<RemoveDir Directories="$(ArtifactsFolder)" />
|
2010-07-13 11:16:34 +08:00
|
|
|
</Target>
|
2010-02-07 12:10:12 +08:00
|
|
|
|
|
|
|
<Target Name ="Compile">
|
2010-07-24 03:46:03 +08:00
|
|
|
<!-- Compile to "OutputFolder" -->
|
2010-02-07 12:10:12 +08:00
|
|
|
<MSBuild
|
|
|
|
Projects="$(SrcFolder)\Orchard.sln"
|
|
|
|
Targets="Build"
|
2010-07-13 11:16:34 +08:00
|
|
|
Properties="Configuration=Release;OutputPath=$(CompileFolder)" />
|
2010-07-24 03:46:03 +08:00
|
|
|
<!-- Compile to "regular" output folder for devs using VS locally -->
|
|
|
|
<MSBuild
|
|
|
|
Projects="$(SrcFolder)\Orchard.sln"
|
|
|
|
Targets="Build"/>
|
2010-02-07 12:10:12 +08:00
|
|
|
</Target>
|
|
|
|
|
2010-07-20 04:57:25 +08:00
|
|
|
<Target Name ="CompileMsBuildTasks">
|
|
|
|
<MSBuild
|
|
|
|
Projects="$(SrcFolder)\Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj"
|
|
|
|
Targets="Build"
|
2010-07-20 06:41:14 +08:00
|
|
|
Properties="Configuration=Release;OutputPath=$(MsBuildTasksFolder)" />
|
2010-07-20 04:57:25 +08:00
|
|
|
</Target>
|
|
|
|
|
2010-07-13 11:16:34 +08:00
|
|
|
<!-- Testing -->
|
2010-02-07 13:20:38 +08:00
|
|
|
|
|
|
|
<Target Name ="Test">
|
2010-07-13 12:45:53 +08:00
|
|
|
<!-- TeamCity support -->
|
|
|
|
<ItemGroup>
|
|
|
|
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
|
|
|
|
</ItemGroup>
|
2010-07-14 13:04:02 +08:00
|
|
|
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(LibFolder)\nunit\addins" />
|
2010-07-13 12:45:53 +08:00
|
|
|
|
2010-07-14 13:04:02 +08:00
|
|
|
<!-- Run unit test assemblies -->
|
2010-07-13 11:16:34 +08:00
|
|
|
<CreateItem Include="$(CompileFolder)\*.Tests.*dll">
|
|
|
|
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
|
|
|
</CreateItem>
|
2010-04-06 04:30:02 +08:00
|
|
|
|
2010-07-14 13:04:02 +08:00
|
|
|
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" />
|
2010-02-07 13:20:38 +08:00
|
|
|
</Target>
|
|
|
|
|
2010-04-06 04:30:02 +08:00
|
|
|
<Target Name ="Spec">
|
2010-07-13 11:16:34 +08:00
|
|
|
<CreateItem Include="$(CompileFolder)\*.Specs.dll">
|
|
|
|
<Output TaskParameter="Include" ItemName="SpecAssemblies" />
|
|
|
|
</CreateItem>
|
|
|
|
<NUnit Assemblies="@(SpecAssemblies)" ToolPath="$(LibFolder)\nunit" />
|
2010-04-06 04:30:02 +08:00
|
|
|
</Target>
|
2010-02-07 13:20:38 +08:00
|
|
|
|
2010-07-17 03:56:10 +08:00
|
|
|
<!-- Packaging (Stage) -->
|
2010-02-08 17:09:38 +08:00
|
|
|
|
2010-07-20 06:41:14 +08:00
|
|
|
<UsingTask AssemblyFile="$(MsBuildTasksFolder)\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.StageProjectAlteration" />
|
|
|
|
<UsingTask AssemblyFile="$(MsBuildTasksFolder)\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.FilterModuleBinaries" />
|
|
|
|
<UsingTask AssemblyFile="$(MsBuildTasksFolder)\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.FileUpdateLines" />
|
2010-02-08 17:09:38 +08:00
|
|
|
|
2010-02-07 12:35:45 +08:00
|
|
|
<Target Name="Package-Stage">
|
2010-07-20 06:41:14 +08:00
|
|
|
<CallTarget Targets="CompileMsBuildTasks"/>
|
|
|
|
|
2010-02-07 12:10:12 +08:00
|
|
|
<ItemGroup>
|
2010-07-19 03:21:36 +08:00
|
|
|
<SqlCe-Native-Binaries-x86 Include="$(SqlCeFolder)\x86\*"/>
|
|
|
|
<SqlCe-Native-Binaries-amd64 Include="$(SqlCeFolder)\amd64\*"/>
|
2010-07-17 05:22:38 +08:00
|
|
|
<Stage-Orchard-Web-Bins Include="$(WebSitesFolder)\Orchard.Web\bin\*"/>
|
2010-02-07 12:10:12 +08:00
|
|
|
<Stage-Bin-Exclude Include="$(WebSitesFolder)\**\bin\**\*" />
|
2010-10-20 15:07:53 +08:00
|
|
|
<Stage-Web Include="$(WebSitesFolder)\Orchard.Web\**\*;$(SrcFolder)\Orchard.Web\*.csproj;" />
|
|
|
|
<Stage-Web-Config Include="$(SrcFolder)\Orchard.Web\**\*.config" />
|
2010-07-23 01:13:31 +08:00
|
|
|
<Stage-Media Include="$(SrcFolder)\Orchard.Web\Media\OrchardLogo.png" />
|
2010-07-28 06:20:17 +08:00
|
|
|
<Stage-PoFiles Include="$(SrcFolder)\Orchard.Web\**\*.po" />
|
2010-07-17 09:17:34 +08:00
|
|
|
<Stage-Core Include="$(WebSitesFolder)\Orchard.Core\**\*" Exclude="$(WebSitesFolder)\Orchard.Core\**\bin\**\*" />
|
2010-10-20 15:07:53 +08:00
|
|
|
<Stage-Themes Include="$(ThemesSrcFolder)\**\*" Exclude="@(Stage-Bin-Exclude);$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\bin\**;$(ThemesSrcFolder)\obj\**;$(ThemesSrcFolder)\*.*;$(ThemesSrcFolder)\Properties\**" />
|
|
|
|
<Stage-Themes-Binaries Include="$(ThemesSrcFolder)\*\**\bin\*" />
|
2010-07-19 03:21:36 +08:00
|
|
|
|
2010-10-20 15:07:53 +08:00
|
|
|
<Stage-Module-Exclude Include="@(Stage-Web);@(Stage-Core);@(Stage-Themes);$(WebSitesFolder)\PackageIndexReferenceImplementation\**\*"/>
|
2010-07-19 03:21:36 +08:00
|
|
|
|
2010-07-17 09:17:34 +08:00
|
|
|
<Stage-Modules Include="$(WebSitesFolder)\**\*" Exclude="@(Stage-Bin-Exclude);@(Stage-Module-Exclude)" />
|
|
|
|
<Stage-Modules-Binaries Include="$(WebSitesFolder)\**\bin\**\*" Exclude="@(Stage-Module-Exclude)"/>
|
|
|
|
<Stage-Modules-Sources Include="$(ModulesSrcFolder)\**\*.csproj;$(ModulesSrcFolder)\**\*.cs"/>
|
2010-02-07 13:20:38 +08:00
|
|
|
<Stage-License Include="$(MSBuildProjectDirectory)\*.txt" />
|
2010-02-07 12:10:12 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
2010-07-17 09:17:34 +08:00
|
|
|
<!-- Copying module binaries is somewhat tricky: From a module "bin" directory, we
|
|
|
|
only want to include the files that are _not_ already present in
|
|
|
|
the "Orchard.Web\Bin" folder. -->
|
|
|
|
<FilterModuleBinaries
|
|
|
|
ModulesBinaries="@(Stage-Modules-Binaries)"
|
|
|
|
OrchardWebBinaries="@(Stage-Orchard-Web-Bins)">
|
|
|
|
<Output TaskParameter="ExcludedBinaries" ItemName="FilterModuleBinaries-ExcludedBinaries"/>
|
|
|
|
</FilterModuleBinaries>
|
2010-10-20 15:07:53 +08:00
|
|
|
<FilterModuleBinaries
|
|
|
|
ModulesBinaries="@(Stage-Themes-Binaries)"
|
|
|
|
OrchardWebBinaries="@(Stage-Orchard-Web-Bins)">
|
|
|
|
<Output TaskParameter="ExcludedBinaries" ItemName="FilterModuleBinaries-ExcludedBinariesFromThemes"/>
|
|
|
|
</FilterModuleBinaries>
|
2010-07-17 09:17:34 +08:00
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<Stage-Modules-Binaries-Unique Include="@(Stage-Modules-Binaries)" Exclude="@(FilterModuleBinaries-ExcludedBinaries)"/>
|
2010-10-20 15:07:53 +08:00
|
|
|
<Stage-Themes-Binaries-Unique Include="@(Stage-Themes-Binaries)" Exclude="@(FilterThemeBinaries-ExcludedBinariesFromThemes)"/>
|
2010-07-17 09:17:34 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
2010-10-20 15:07:53 +08:00
|
|
|
<Copy SourceFiles="@(Stage-Web);@(Stage-Web-Config);@(Stage-License)" DestinationFolder="$(StageFolder)\%(RecursiveDir)"/>
|
2010-07-23 01:13:31 +08:00
|
|
|
<Copy SourceFiles="@(Stage-Media)" DestinationFolder="$(StageFolder)\Media"/>
|
2010-07-28 06:20:17 +08:00
|
|
|
<Copy SourceFiles="@(Stage-PoFiles)" DestinationFolder="$(StageFolder)\%(RecursiveDir)"/>
|
2010-07-19 03:21:36 +08:00
|
|
|
<Copy SourceFiles="@(SqlCe-Native-Binaries-x86)" DestinationFolder="$(StageFolder)\bin\x86"/>
|
|
|
|
<Copy SourceFiles="@(SqlCe-Native-Binaries-amd64)" DestinationFolder="$(StageFolder)\bin\amd64"/>
|
|
|
|
<Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(StageFolder)\Core\%(RecursiveDir)"/>
|
|
|
|
<Copy SourceFiles="@(Stage-Modules)" DestinationFolder="$(StageFolder)\Modules\%(RecursiveDir)"/>
|
|
|
|
<Copy SourceFiles="@(Stage-Modules-Sources)" DestinationFolder="$(StageFolder)\Modules\%(RecursiveDir)"/>
|
|
|
|
<Copy SourceFiles="@(Stage-Modules-Binaries-Unique)" DestinationFolder="$(StageFolder)\Modules\%(RecursiveDir)"/>
|
2010-10-20 15:07:53 +08:00
|
|
|
<Copy SourceFiles="@(Stage-Themes)" DestinationFolder="$(StageFolder)\Themes\%(RecursiveDir)"/>
|
|
|
|
<Copy SourceFiles="@(Stage-Themes-Binaries-Unique)" DestinationFolder="$(StageFolder)\Themes\%(RecursiveDir)"/>
|
2010-07-23 01:23:34 +08:00
|
|
|
<MakeDir Directories="$(StageFolder)\App_Data"/>
|
|
|
|
<WriteLinesToFile File="$(StageFolder)\App_Data\_marker.txt" Lines="some_text" Overwrite="true"/>
|
|
|
|
|
2010-02-08 17:09:38 +08:00
|
|
|
|
|
|
|
<!-- extra processing of the staged csproj file -->
|
2010-07-17 03:56:10 +08:00
|
|
|
<StageProjectAlteration ProjectFileName="$(StageFolder)\Orchard.Web.csproj" AddContentFiles="
|
2010-02-08 17:09:38 +08:00
|
|
|
@(Stage-Modules->'Modules\%(RecursiveDir)%(Filename)%(Extension)');
|
|
|
|
@(Stage-Core->'Core\%(RecursiveDir)%(Filename)%(Extension)')">
|
|
|
|
<Output TaskParameter="ExtraFiles" ItemName="StageProjectAlteration-ExtraFiles"/>
|
|
|
|
</StageProjectAlteration>
|
|
|
|
|
2010-05-19 05:05:11 +08:00
|
|
|
<!-- extra processing of the staged config files -->
|
|
|
|
|
2010-07-17 03:56:10 +08:00
|
|
|
<XmlUpdate XmlFileName="$(StageFolder)\web.config"
|
2010-05-19 05:05:11 +08:00
|
|
|
XPath="/configuration/system.web/compilation/@debug"
|
|
|
|
Value="false" />
|
|
|
|
|
2010-09-03 06:32:47 +08:00
|
|
|
<XmlUpdate XmlFileName="$(StageFolder)\web.config"
|
|
|
|
XPath="/configuration/system.web/machineKey/@validationKey"
|
|
|
|
Value="AutoGenerate" />
|
|
|
|
|
|
|
|
<XmlUpdate XmlFileName="$(StageFolder)\web.config"
|
|
|
|
XPath="/configuration/system.web/machineKey/@decryptionKey"
|
|
|
|
Value="AutoGenerate" />
|
|
|
|
|
2010-07-17 03:56:10 +08:00
|
|
|
<XmlUpdate XmlFileName="$(StageFolder)\Config\Diagnostics.config"
|
2010-05-19 05:05:11 +08:00
|
|
|
XPath="/system.diagnostics/trace/@autoflush"
|
|
|
|
Value="false" />
|
|
|
|
|
2010-07-17 03:56:10 +08:00
|
|
|
<XmlUpdate XmlFileName="$(StageFolder)\Config\Diagnostics.config"
|
2010-05-19 05:05:11 +08:00
|
|
|
XPath="/system.diagnostics/sources/source/@switchValue"
|
|
|
|
Value="Error" />
|
|
|
|
|
2010-02-08 17:09:38 +08:00
|
|
|
<!-- move over extra non-content files the csproj referenced -->
|
2010-07-13 11:16:34 +08:00
|
|
|
<Copy SourceFiles="@(StageProjectAlteration-ExtraFiles->'$(SrcFolder)\Orchard.Web\%(Identity)')"
|
2010-07-17 03:56:10 +08:00
|
|
|
DestinationFolder="$(StageFolder)\%(RecursiveDir)"/>
|
2010-02-08 17:09:38 +08:00
|
|
|
|
2010-02-07 12:10:12 +08:00
|
|
|
</Target>
|
|
|
|
|
2010-07-17 03:56:10 +08:00
|
|
|
<!-- Packaging (MsDeploy) -->
|
|
|
|
<Target Name="Package-MsDeploy">
|
|
|
|
<ItemGroup>
|
2010-07-19 03:21:36 +08:00
|
|
|
<!--<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.xml" />-->
|
2010-11-19 10:19:05 +08:00
|
|
|
|
|
|
|
<MsDeploy-Exclude-Modules Include="
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Localization\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Messaging\**;
|
|
|
|
$(StageFolder)\**\Modules\Lucene\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.ArchiveLater\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.CodeGeneration\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Email\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Experimental\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Indexing\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Migrations\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.MultiTenancy\**;
|
|
|
|
$(StageFolder)\**\Modules\Orchard.Search\**;
|
|
|
|
" />
|
|
|
|
|
|
|
|
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;@(MsDeploy-Exclude-Modules)" />
|
2010-11-11 07:48:47 +08:00
|
|
|
<MsDeploy-Parameters Include="$(LibFolder)\msdeploy\*.xml;$(LibFolder)\msdeploy\*.sql"/>
|
2010-07-17 03:56:10 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Copy SourceFiles="@(MsDeploy-Folder-Input)"
|
|
|
|
DestinationFolder="$(MsDeployFolder)\Orchard\%(RecursiveDir)"/>
|
|
|
|
<Copy SourceFiles="@(MsDeploy-Parameters)"
|
|
|
|
DestinationFolder="$(MsDeployFolder)"/>
|
|
|
|
</Target>
|
|
|
|
|
2010-02-07 12:35:45 +08:00
|
|
|
<Target Name="Package-Zip">
|
|
|
|
<ItemGroup>
|
2010-02-07 13:20:38 +08:00
|
|
|
<Zip-Exclude Include="
|
|
|
|
$(MSBuildProjectDirectory)\src\**\bin\**\*;
|
|
|
|
$(MSBuildProjectDirectory)\src\**\obj\**\*;
|
|
|
|
$(MSBuildProjectDirectory)\**\App_Data\**\*;
|
|
|
|
$(MSBuildProjectDirectory)\**\_ReSharper*\**\*;
|
|
|
|
$(MSBuildProjectDirectory)\**\*.sln.cache;
|
|
|
|
$(MSBuildProjectDirectory)\**\*.suo;
|
|
|
|
$(MSBuildProjectDirectory)\**\*.user;
|
|
|
|
$(MSBuildProjectDirectory)\**\*.patch;
|
|
|
|
$(MSBuildProjectDirectory)\**\*.hg;
|
|
|
|
" />
|
2010-07-13 11:16:34 +08:00
|
|
|
|
2010-02-07 12:35:45 +08:00
|
|
|
<Zip-Stage Include="$(StageFolder)\**\*" />
|
2010-07-13 11:16:34 +08:00
|
|
|
|
2010-07-17 03:56:10 +08:00
|
|
|
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" />
|
|
|
|
|
2010-02-07 13:20:38 +08:00
|
|
|
<Zip-Source Include="
|
|
|
|
$(MSBuildProjectDirectory)\lib\**\*;
|
|
|
|
$(MSBuildProjectDirectory)\src\**\*;
|
|
|
|
$(MSBuildProjectDirectory)\*.txt;
|
|
|
|
" Exclude="@(Zip-Exclude)" />
|
2010-07-13 11:16:34 +08:00
|
|
|
|
2010-02-07 12:35:45 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
2010-07-17 04:03:40 +08:00
|
|
|
<MakeDir Directories="$(MsDeployArtifactFolder);$(SourceArtifactFolder)"/>
|
2010-05-15 03:24:08 +08:00
|
|
|
|
2010-07-20 05:25:26 +08:00
|
|
|
<PropertyGroup>
|
|
|
|
<ZipVersionFileSuffix Condition="$(Version) != ''">.$(Version)</ZipVersionFileSuffix>
|
|
|
|
<ZipVersionFileSuffix Condition="$(Version) == ''"></ZipVersionFileSuffix>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Zip Files="@(Zip-MsDeploy)" WorkingDirectory="$(MsDeployFolder)" ZipFileName="$(MsDeployArtifactFolder)\Orchard.Web$(ZipVersionFileSuffix).zip" />
|
|
|
|
<Zip Files="@(Zip-Source)" WorkingDirectory="$(MSBuildProjectDirectory)" ZipFileName="$(SourceArtifactFolder)\Orchard.Source$(ZipVersionFileSuffix).zip" />
|
2010-02-07 12:35:45 +08:00
|
|
|
</Target>
|
|
|
|
|
2010-07-13 11:16:34 +08:00
|
|
|
<!-- Profiling -->
|
2010-05-07 03:53:27 +08:00
|
|
|
|
|
|
|
<Target Name="Profiling-Stage">
|
|
|
|
<ItemGroup>
|
2010-07-17 03:56:10 +08:00
|
|
|
<Profiling-Web Include="$(StageFolder)\**\*" />
|
2010-05-07 03:53:27 +08:00
|
|
|
</ItemGroup>
|
2010-07-13 11:16:34 +08:00
|
|
|
|
2010-05-07 03:53:27 +08:00
|
|
|
<Copy SourceFiles="@(Profiling-Web)" DestinationFolder="$(ProfilingFolder)\%(RecursiveDir)"/>
|
2010-07-13 11:16:34 +08:00
|
|
|
|
2010-05-07 03:53:27 +08:00
|
|
|
</Target>
|
2010-07-13 11:16:34 +08:00
|
|
|
|
2010-05-07 03:53:27 +08:00
|
|
|
<Target Name="Profiling-Setup">
|
|
|
|
<Exec Command="$(ProfilingFolder)\bin\Orchard.exe @$(SrcFolder)\Orchard.Profile\profiling-setup-commands.txt" WorkingDirectory="$(ProfilingFolder)"/>
|
|
|
|
</Target>
|
|
|
|
|
2010-07-20 04:38:35 +08:00
|
|
|
|
|
|
|
<!-- Version -->
|
|
|
|
<!-- Update all AssemblyInfo.cs and module.txt files to contain $(Version) -->
|
2010-07-20 04:57:25 +08:00
|
|
|
<Target Name="SetVersion" Condition="$(Version) != ''">
|
|
|
|
<CallTarget Targets="CompileMsBuildTasks"/>
|
2010-07-20 06:41:14 +08:00
|
|
|
|
2010-07-20 04:38:35 +08:00
|
|
|
<ItemGroup>
|
|
|
|
<Version-AssemblyInfos Include="$(SrcFolder)\**\AssemblyInfo.cs" />
|
|
|
|
<Version-Modules Include="$(SrcFolder)\**\Module.txt" />
|
2010-10-20 15:07:53 +08:00
|
|
|
<Version-Themes Include="$(SrcFolder)\**\Theme.txt" />
|
2010-07-20 04:38:35 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<FileUpdateLines Files="@(Version-Modules)"
|
|
|
|
Regex="^(orchardversion|version)(\s*):(\s*)(.*)"
|
2010-07-20 04:57:25 +08:00
|
|
|
ReplacementText="${1}${2}:${3}$(Version)"
|
|
|
|
IgnoreCase="True"/>
|
2010-07-20 04:38:35 +08:00
|
|
|
|
2010-10-20 15:07:53 +08:00
|
|
|
<FileUpdateLines Files="@(Version-Themes)"
|
|
|
|
Regex="^(orchardversion|version)(\s*):(\s*)(.*)"
|
|
|
|
ReplacementText="${1}${2}:${3}$(Version)"
|
|
|
|
IgnoreCase="True"/>
|
|
|
|
|
2010-07-20 04:57:25 +08:00
|
|
|
<FileUpdateLines Files="@(Version-AssemblyInfos)"
|
|
|
|
Regex="^\[assembly:(\s)*(AssemblyVersion|AssemblyFileVersion)(\s)*\("(.*)"\)(\s)*\]"
|
|
|
|
ReplacementText="[assembly:${1}${2}${3}("$(Version)")${5}]"
|
|
|
|
IgnoreCase="True"/>
|
2010-07-20 04:38:35 +08:00
|
|
|
</Target>
|
2010-02-07 12:10:12 +08:00
|
|
|
</Project>
|