Updated all config templates to not be marked as content so they are not output in the build.

Updated the build script to ensure that macroEngines, editorControls and webservices are build separately and
then copy their output DLLs to the build folder to be zipped up.
Ensured that the offset time stuff is working in the build script too.
This commit is contained in:
shannon@ShandemVaio.home
2012-06-27 22:59:33 +04:00
parent 789497a717
commit 6126e9526b
9 changed files with 129 additions and 124 deletions

View File

@@ -3,7 +3,7 @@
<MSBuildCommunityTasksPath>..\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
<UmbracoMSBuildTasksPath>..\UmbracoMSBuildTasks</UmbracoMSBuildTasksPath>
</PropertyGroup>
<!--<Import Project="..\lib\References\Umbraco\UmbracoMSBuildTasks\Umbraco.MSBuild.Tasks.Targets" />-->
<Import Project="..\lib\Umbraco\UmbracoMSBuildTasks\Umbraco.MSBuild.Tasks.Targets" />
<Import Project="..\lib\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<PropertyGroup>
<BuildFolder>_BuildOutput\</BuildFolder>
@@ -19,9 +19,6 @@
<WebAppFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebApp\</WebAppFolderRelativeToProjects>
<WebBuildFolderWildcard>$(WebAppFolder)**\*.*</WebBuildFolderWildcard>
<WebBuildFolderExclusionWildcard>$(WebAppFolder)**\Web.Template.*;$(WebAppFolder)**\*.pdb</WebBuildFolderExclusionWildcard>
<!--<WebProjectPluginFolder>Web Apps\Umbraco.Cms.Web.UI\App_Plugins\</WebProjectPluginFolder>
<WebProjectPluginFolderWildcard>$(WebProjectPluginFolder)**\*.*</WebProjectPluginFolderWildcard>
<WebProjectPluginFolderExclusionWildcard>$(WebProjectPluginFolder)Packages\DevDataset\**\*.*;$(WebProjectPluginFolder)Packages\uGoLive\**\*.*</WebProjectPluginFolderExclusionWildcard>-->
</PropertyGroup>
<Target Name="Build" DependsOnTargets="ZipWebApp">
<Message Text="Build finished" />
@@ -31,8 +28,7 @@
<RemoveDir Directories="build\$(BuildFolder)" />
<Message Text="Finished deleting $(BuildFolder)" Importance="high" />
</Target>
<!--<Target Name="ZipWebApp" DependsOnTargets="OffsetTimestamps">-->
<Target Name="ZipWebApp" DependsOnTargets="CompileWeb" >
<Target Name="ZipWebApp" DependsOnTargets="OffsetTimestamps" >
<Time Format="yyyyMMdd-HHmm">
<Output TaskParameter="FormattedTime" PropertyName="buildDate" />
</Time>
@@ -41,62 +37,83 @@
<Exec Command="dir ." />
<Message Text=" " />
<Message Text="FOLDER = $(WebBuildFolderWildcard)" Importance="high" />-->
<CreateItem Include="$(WebBuildFolderWildcard)" Exclude="$(WebBuildFolderExclusionWildcard)">
<!--<CreateItem Include="$(WebBuildFolderWildcard)" Exclude="$(WebBuildFolderExclusionWildcard)">
<Output TaskParameter="Include" ItemName="WebFilesToZip" />
</CreateItem>
<CreateItem Include="$(SolutionBinBuildFolderWildcard)" Exclude="$(SolutionBinBuildFolderExclusionWildcard)">
<Output TaskParameter="Include" ItemName="BinFilesToZip" />
</CreateItem>
<Message Text="Starting to zip to $(buildDate)-$(BuildZipFileName)" Importance="high" />
<MSBuild.Community.Tasks.Zip Files="@(BinFilesToZip)" ZipFileName="$(buildDate)-$(BuildZipFileNameBin)" WorkingDirectory="$(SolutionBinFolder)" />
<MSBuild.Community.Tasks.Zip Files="@(WebFilesToZip)" ZipFileName="$(buildDate)-$(BuildZipFileName)" WorkingDirectory="$(WebAppFolder)" />
<Message Text="Finished zipping to build\$(BuildFolder)\$(buildDate)-$(BuildZipFileName)" Importance="high" />
<Message Text="Finished zipping to build\$(BuildFolder)\$(buildDate)-$(BuildZipFileName)" Importance="high" />-->
</Target>
<Target Name="CompileWeb">
<Target Name="CompileProjects">
<Message Text="Compiling web project to build\$(BuildFolder)" Importance="high" />
<!-- For UseWPP_CopyWebApplication=True see http://stackoverflow.com/questions/1983575/copywebapplication-with-web-config-transformations -->
<MSBuild Projects="..\src\umbraco.sln" Properties="Configuration=Release;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;OutDir=$(SolutionBinFolderRelativeToProjects);WebProjectOutputDir=$(WebAppFolderRelativeToProjects)" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
<MSBuild Projects="..\src\umbraco.presentation\umbraco.presentation.csproj" Properties="WarningLevel=0;Configuration=Release;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;OutDir=$(SolutionBinFolderRelativeToProjects);WebProjectOutputDir=$(WebAppFolderRelativeToProjects)" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
</MSBuild>
<!--
TODO:
<!--
Now, because of all the circular dependencies we need to build those projects and have them dump their DLLs/assets out to the same folder. Really wish this wasn't the case!
These are:
umbraco.editorControls
umbraco.webservices
umbraco.MacroEngines
each of these projects has a post build to put their stuff in the correct location based on the solution, but we may have to create a special build
configuration for each of these to get them to put their files in our build folder or something like that
These are: umbraco.editorControls umbraco.webservices umbraco.MacroEngines
Each of these projects has a post build to put their stuff in the correct location based on the solution and unfortunately for us each
of these projects references the web application! So if we specify an OutDir parameter it will also trigger a web deploy and chuck another
website output in bin/_PublishedWebSites folder. we cannot disable this: http://social.msdn.microsoft.com/forums/en-US/tfsbuild/thread/3ec642ad-2e6d-424c-891a-62f6409da62a/
so we need to just build the project 'in-place' then copy its output to the SolutionBinFolder
-->
<Message Text="Finished compiling web project to build\$(BuildFolder)" Importance="high" />
<Message Text="Compiling MacroEngines project" Importance="high" />
<MSBuild Projects="..\src\umbraco.MacroEngines\umbraco.MacroEngines.csproj" Properties="WarningLevel=0;Configuration=Release;" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
</MSBuild>
<ItemGroup>
<MacroEngineDll Include="..\src\umbraco.MacroEngines\bin\Release\umbraco.MacroEngines.dll"/>
</ItemGroup>
<Copy SourceFiles="@(MacroEngineDll)"
DestinationFolder="$(SolutionBinFolder)" OverwriteReadOnlyFiles="True"/>
<Copy SourceFiles="@(MacroEngineDll)"
DestinationFolder="$(WebAppFolder)\bin" OverwriteReadOnlyFiles="True"/>
<Message Text="Compiling editorControls project" Importance="high" />
<MSBuild Projects="..\src\umbraco.editorControls\umbraco.editorControls.csproj" Properties="WarningLevel=0;Configuration=Release;" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
</MSBuild>
<ItemGroup>
<EditorControlsDll Include="..\src\umbraco.editorControls\bin\Release\umbraco.editorControls.dll"/>
</ItemGroup>
<Copy SourceFiles="@(EditorControlsDll)"
DestinationFolder="$(SolutionBinFolder)" OverwriteReadOnlyFiles="True"/>
<Copy SourceFiles="@(EditorControlsDll)"
DestinationFolder="$(WebAppFolder)\bin" OverwriteReadOnlyFiles="True"/>
<Message Text="Compiling webservices project" Importance="high" />
<MSBuild Projects="..\src\umbraco.webservices\umbraco.webservices.csproj" Properties="WarningLevel=0;Configuration=Release;" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
</MSBuild>
<ItemGroup>
<WebServicesDll Include="..\src\umbraco.webservices\bin\Release\umbraco.webservices.dll"/>
<WebServicesASMX Include="..\src\umbraco.webservices\*.asmx"/>
</ItemGroup>
<Copy SourceFiles="@(WebServicesDll)"
DestinationFolder="$(SolutionBinFolder)" OverwriteReadOnlyFiles="True"/>
<Copy SourceFiles="@(WebServicesDll)"
DestinationFolder="$(WebAppFolder)\bin" OverwriteReadOnlyFiles="True"/>
<Copy SourceFiles="@(WebServicesASMX)"
DestinationFolder="$(WebAppFolder)\umbraco\webservices\api" OverwriteReadOnlyFiles="True"/>
<Message Text="Finished compiling projects" Importance="high" />
</Target>
<Target Name="OffsetTimestamps" DependsOnTargets="CompileProjects">
<CreateItem Include="$(BuildFolder)**\umbraco.*.dll">
<Output TaskParameter="Include" ItemName="FilesToOffsetTimestamp" />
</CreateItem>
<Message Text="Starting to offset timestamps" Importance="high" />
<Umbraco.MSBuild.Tasks.TimestampOffset Files="@(FilesToOffsetTimestamp)" Offset="-11" />
<Message Text="Finished offsetting timestamps" Importance="high" />
</Target>
<!--<Target Name="CopyDefaultPlugins" DependsOnTargets="CompileWeb">
<Message Text="Copying default plugins using $(WebProjectPluginFolderWildcard)" Importance="high" />
<CreateItem Include="$(WebProjectPluginFolderWildcard)" Exclude="$(WebProjectPluginFolderExclusionWildcard)">
<Output TaskParameter="Include" ItemName="TargetFiles" />
</CreateItem>
<Copy SourceFiles="@(TargetFiles)" DestinationFiles="@(TargetFiles->'$(WebAppFolder)App_Plugins\%(RecursiveDir)%(Filename)%(Extension)')" Retries="5" OverwriteReadOnlyFiles="True" SkipUnchangedFiles="True" />
<Message Text="Finished Copying default plugins" Importance="high" />
</Target>
<Target Name="OffsetTimestamps" DependsOnTargets="CopyDefaultPlugins">
<CreateItem Include="$(BuildFolder)**\Umbraco.*.dll">
<Output TaskParameter="Include" ItemName="FilesToOffsetTimestamp" />
</CreateItem>
<Message Text="Starting to offset timestamps" Importance="high" />
<Umbraco.MSBuild.Tasks.TimestampOffset Files="@(FilesToOffsetTimestamp)" Offset="-11" />
<Message Text="Finished offsetting timestamps" Importance="high" />
</Target>-->
<Target Name="AfterBuild">
<Message Text="Hi" />
</Target>

View File

@@ -154,7 +154,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\umbraco.presentation\bin\" /Y /F
<PostBuildEvent>xcopy "$(TargetPath)" "$(ProjectDir)..\umbraco.presentation\bin\" /Y /F
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -483,6 +483,6 @@
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\umbraco.presentation\bin\" /Y /F</PostBuildEvent>
<PostBuildEvent>xcopy "$(TargetPath)" "$(ProjectDir)..\umbraco.presentation\bin\" /Y /F</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -2590,18 +2590,18 @@
<Content Include="config\Skinning.config" />
<Content Include="config\feedProxy.config" />
<Content Include="umbraco_client\ui\ui-lightness\jquery-ui.custom.css" />
<Content Include="web.Template.ShandemVaio.Debug.config">
<None Include="web.Template.ShandemVaio.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
<SubType>Designer</SubType>
</Content>
<Content Include="web.Template.Debug.config">
</None>
<None Include="web.Template.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
<SubType>Designer</SubType>
</Content>
<Content Include="web.Template.Release.config">
</None>
<None Include="web.Template.Release.config">
<DependentUpon>Web.Template.config</DependentUpon>
<SubType>Designer</SubType>
</Content>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings1.Designer.cs</LastGenOutput>
@@ -3101,9 +3101,9 @@
<Content Include="umbraco\webservices\MediaUploader.ashx" />
<None Include="umbraco_client\CodeMirror\LICENSE" />
<None Include="Web References\org.umbraco.update\checkforupgrade.disco" />
<Content Include="web.Template.config">
<None Include="web.Template.config">
<SubType>Designer</SubType>
</Content>
</None>
<None Include="Web References\org.umbraco.update\checkforupgrade.wsdl" />
<None Include="Web References\org.umbraco.update\Reference.map">
<Generator>MSDiscoCodeGenerator</Generator>
@@ -3171,60 +3171,60 @@
<Content Include="web.config">
<SubType>Designer</SubType>
</Content>
<Content Include="web.Template.User-VAIO.Debug.config">
<None Include="web.Template.User-VAIO.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.UMBRACOTOSH.Debug.config">
</None>
<None Include="web.Template.UMBRACOTOSH.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.UMBRACOHUMMER.Debug.config">
</None>
<None Include="web.Template.UMBRACOHUMMER.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.UMBRACOELISE.Debug.config">
</None>
<None Include="web.Template.UMBRACOELISE.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.ssaolap01.Debug.config">
</None>
<None Include="web.Template.ssaolap01.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.ssaodsk01.Debug.config">
</None>
<None Include="web.Template.ssaodsk01.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.SONIC.Debug.config">
</None>
<None Include="web.Template.SONIC.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.PETER-PC.Debug.config">
</None>
<None Include="web.Template.PETER-PC.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.PETER-MAC.Debug.config">
</None>
<None Include="web.Template.PETER-MAC.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.slacebox.Debug.config">
</None>
<None Include="web.Template.slacebox.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.NIBBLE-LAPTOP.Debug.config">
</None>
<None Include="web.Template.NIBBLE-LAPTOP.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.INDIGO64SSD.Debug.config">
</None>
<None Include="web.Template.INDIGO64SSD.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.INDIGO64.Debug.config">
</None>
<None Include="web.Template.INDIGO64.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.EQUIUM-SAT1.Debug.config">
</None>
<None Include="web.Template.EQUIUM-SAT1.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.Blueberry.Debug.config">
</None>
<None Include="web.Template.Blueberry.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.APOWELL-BC-WIN7.Debug.config">
</None>
<None Include="web.Template.APOWELL-BC-WIN7.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.13INCHER.Debug.config">
</None>
<None Include="web.Template.13INCHER.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
<Content Include="web.Template.MBP-PC.Debug.config">
</None>
<None Include="web.Template.MBP-PC.Debug.config">
<DependentUpon>Web.Template.config</DependentUpon>
</Content>
</None>
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />

View File

@@ -3,27 +3,16 @@
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add xdt:Transform="Replace" xdt:Locator="Match(key)" key="umbracoDebugMode" value="false"/>
</appSettings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<trace enabled="false" xdt:Transform="SetAttributes(enabled)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
<trace enabled="false" xdt:Transform="SetAttributes(enabled)" />
<customErrors mode="RemoteOnly" xdt:Transform="SetAttributes(mode)">
</customErrors>
</system.web>
<location path="Umbraco">
<system.web>
<customErrors mode="On" defaultRedirect="Default/Error" xdt:Transform="Replace" >
</customErrors>
</system.web>
</location>
</configuration>

View File

@@ -45,7 +45,7 @@
<appSettings>
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;database=umbraco;user id=web;password=farmer" />
<add key="umbracoConfigurationStatus" value="4.6.0.Alpha" />
<add key="umbracoConfigurationStatus" value="4.8.0" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
@@ -54,7 +54,7 @@
<add key="umbracoEnableStat" value="false" />
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
<add key="umbracoEditXhtmlMode" value="true" />
<add key="umbracoUseDirectoryUrls" value="false" />
<add key="umbracoUseDirectoryUrls" value="true" />
<add key="umbracoDebugMode" value="true" />
<add key="umbracoTimeOutInMinutes" value="20" />
<add key="umbracoVersionCheckPeriod" value="7" />
@@ -268,6 +268,5 @@
</pages>
</system.web.webPages.razor>
<!-- End of added in Umbraco 4.6.2 -->
</configuration>

View File

@@ -45,7 +45,7 @@
<appSettings>
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;database=umbraco;user id=web;password=farmer" />
<add key="umbracoConfigurationStatus" value="4.6.0.Alpha" />
<add key="umbracoConfigurationStatus" value="4.8.0" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
@@ -54,8 +54,8 @@
<add key="umbracoEnableStat" value="false" />
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
<add key="umbracoEditXhtmlMode" value="true" />
<add key="umbracoUseDirectoryUrls" value="false" />
<add key="umbracoDebugMode" value="true" />
<add key="umbracoUseDirectoryUrls" value="true" />
<add key="umbracoDebugMode" value="false"/>
<add key="umbracoTimeOutInMinutes" value="20" />
<add key="umbracoVersionCheckPeriod" value="7" />
<add key="umbracoDisableXsltExtensions" value="true" />
@@ -90,8 +90,8 @@
</connectionStrings>
<system.web>
<httpRuntime requestValidationMode="2.0" />
<customErrors mode="Off" />
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<customErrors mode="RemoteOnly" />
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
<xhtmlConformance mode="Strict" />
@@ -129,7 +129,7 @@
<add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
</httpHandlers>
<compilation defaultLanguage="c#" debug="true" batch="false">
<compilation defaultLanguage="c#" batch="false">
<assemblies>
<!-- ASPNETAJAX -->
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
@@ -268,6 +268,5 @@
</pages>
</system.web.webPages.razor>
<!-- End of added in Umbraco 4.6.2 -->
</configuration>

View File

@@ -39,6 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2849E9D4
ProjectSection(SolutionItems) = preProject
..\build\Build.bat = ..\build\Build.bat
..\build\Build.proj = ..\build\Build.proj
umbraco.presentation.targets = umbraco.presentation.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FD962632-184C-4005-A5F3-E705D92FC645}"

View File

@@ -160,7 +160,7 @@
</Target>
-->
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\umbraco.presentation\bin\" /Y /F
xcopy "$(ProjectDir)*.asmx" "$(SolutionDir)\umbraco.presentation\umbraco\webservices\api\" /Y /F</PostBuildEvent>
<PostBuildEvent>xcopy "$(TargetPath)" "$(ProjectDir)..\umbraco.presentation\bin\" /Y /F
xcopy "$(ProjectDir)*.asmx" "$(ProjectDir)..\umbraco.presentation\umbraco\webservices\api\" /Y /F</PostBuildEvent>
</PropertyGroup>
</Project>