Split out the Belle build and integrate it in the build of the Web.UI project
This commit is contained in:
@@ -8,36 +8,8 @@ ECHO Building Umbraco %version%
|
|||||||
|
|
||||||
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
|
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
|
||||||
|
|
||||||
SET nuGetFolder=%CD%\..\src\packages\
|
|
||||||
|
|
||||||
ECHO Installing Npm NuGet Package
|
|
||||||
..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%
|
|
||||||
|
|
||||||
for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
|
|
||||||
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
|
|
||||||
|
|
||||||
ECHO Temporarily adding Npm and Node to path
|
|
||||||
SET oldPath=%PATH%
|
|
||||||
|
|
||||||
path=%npmPath%;%nodePath%;%PATH%
|
|
||||||
|
|
||||||
SET buildFolder="%CD%"
|
|
||||||
|
|
||||||
ECHO Go to Umbraco.Web.UI.Client folder
|
|
||||||
CD ..\src\Umbraco.Web.UI.Client\
|
|
||||||
|
|
||||||
ECHO Do npm install and the grunt build of Belle
|
|
||||||
call npm install
|
|
||||||
call npm install -g grunt-cli
|
|
||||||
call grunt
|
|
||||||
|
|
||||||
ECHO Reset path to what it was before
|
|
||||||
path=%oldPath%
|
|
||||||
|
|
||||||
ECHO Move back to the build folder
|
|
||||||
CD %buildFolder%
|
|
||||||
|
|
||||||
ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise you'd have to run build.cmd twice
|
ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise you'd have to run build.cmd twice
|
||||||
|
SET nuGetFolder=%CD%\..\src\packages\
|
||||||
..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder%
|
..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder%
|
||||||
|
|
||||||
ECHO Performing MSBuild and producing Umbraco binaries zip files
|
ECHO Performing MSBuild and producing Umbraco binaries zip files
|
||||||
|
|||||||
32
build/BuildBelle.bat
Normal file
32
build/BuildBelle.bat
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
ECHO Installing Npm NuGet Package
|
||||||
|
|
||||||
|
SET nuGetFolder=%CD%\..\src\packages\
|
||||||
|
ECHO Configured packages folder: %nuGetFolder%
|
||||||
|
ECHO Current folder: %CD%
|
||||||
|
|
||||||
|
%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%
|
||||||
|
|
||||||
|
for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
|
||||||
|
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
|
||||||
|
|
||||||
|
ECHO Temporarily adding Npm and Node to path
|
||||||
|
SET oldPath=%PATH%
|
||||||
|
|
||||||
|
path=%npmPath%;%nodePath%;%PATH%
|
||||||
|
|
||||||
|
SET buildFolder=%CD%
|
||||||
|
|
||||||
|
ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
|
||||||
|
CD %CD%\..\src\Umbraco.Web.UI.Client\
|
||||||
|
|
||||||
|
ECHO Do npm install and the grunt build of Belle
|
||||||
|
call npm install
|
||||||
|
call npm install -g grunt-cli
|
||||||
|
call grunt
|
||||||
|
|
||||||
|
ECHO Reset path to what it was before
|
||||||
|
path=%oldPath%
|
||||||
|
|
||||||
|
ECHO Move back to the build folder
|
||||||
|
CD %buildFolder%
|
||||||
@@ -2668,11 +2668,17 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
|
|||||||
<!-- Transform the local Web.config file in Visual Studio -->
|
<!-- Transform the local Web.config file in Visual Studio -->
|
||||||
<TransformXml Source="$(ProjectDir)Web.config" Transform="$(ProjectDir)web.Template.$(Configuration).config" Destination="$(ProjectDir)Web.$(Configuration).config.transformed" Condition="$(BuildingInsideVisualStudio) == true" />
|
<TransformXml Source="$(ProjectDir)Web.config" Transform="$(ProjectDir)web.Template.$(Configuration).config" Destination="$(ProjectDir)Web.$(Configuration).config.transformed" Condition="$(BuildingInsideVisualStudio) == true" />
|
||||||
<!-- Always transform the Template file when not in VS (ie: build.bat) -->
|
<!-- Always transform the Template file when not in VS (ie: build.bat) -->
|
||||||
<TransformXml Source="$(ProjectDir)Web.Template.config" Transform="$(ProjectDir)web.Template.$(Configuration).config" Destination="$(ProjectDir)Web.$(Configuration).config.transformed" Condition="$(BuildingInsideVisualStudio) != true" />
|
<TransformXml Source="$(ProjectDir)Web.Template.config" Transform="$(ProjectDir)web.Template.$(Configuration).config" Destination="Web.$(Configuration).config.transformed" Condition="$(BuildingInsideVisualStudio) != true" />
|
||||||
|
<!-- Only runs if the Belle build folder doesn't yet exist -->
|
||||||
|
<CallTarget Targets="BelleBuild" Condition="!Exists('$(ProjectDir)\..\Umbraco.Web.UI.Client\build')" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
<Copy SourceFiles="$(ProjectDir)Web.$(Configuration).config.transformed" DestinationFiles="$(ProjectDir)Web.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="$(BuildingInsideVisualStudio) == true" />
|
<Copy SourceFiles="$(ProjectDir)Web.$(Configuration).config.transformed" DestinationFiles="$(ProjectDir)Web.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="$(BuildingInsideVisualStudio) == true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Target Name="BelleBuild" BeforeTargets="Rebuild">
|
||||||
|
<!-- Only runs when a Rebuild is requested -->
|
||||||
|
<Exec WorkingDirectory="$(ProjectDir)\..\..\build\" Command="BuildBelle.bat" ConsoleToMSBuild="true" IgnoreExitCode="true" ContinueOnError="WarnAndContinue" />
|
||||||
|
</Target>
|
||||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" />
|
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" />
|
||||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||||
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio 2013
|
# Visual Studio 2013
|
||||||
VisualStudioVersion = 12.0.21005.1
|
VisualStudioVersion = 12.0.21005.1
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Web.UI", "Umbraco.Web.UI\Umbraco.Web.UI.csproj", "{4C4C194C-B5E4-4991-8F87-4373E24CC19F}"
|
||||||
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2849E9D4-3B4E-40A3-A309-F3CB4F0E125F}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2849E9D4-3B4E-40A3-A309-F3CB4F0E125F}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
..\build\Build.bat = ..\build\Build.bat
|
..\build\Build.bat = ..\build\Build.bat
|
||||||
@@ -26,8 +28,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpecs", "NuSpecs", "{227C
|
|||||||
..\build\NuSpecs\UmbracoCms.nuspec = ..\build\NuSpecs\UmbracoCms.nuspec
|
..\build\NuSpecs\UmbracoCms.nuspec = ..\build\NuSpecs\UmbracoCms.nuspec
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Web.UI", "Umbraco.Web.UI\Umbraco.Web.UI.csproj", "{4C4C194C-B5E4-4991-8F87-4373E24CC19F}"
|
|
||||||
EndProject
|
|
||||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}"
|
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}"
|
||||||
ProjectSection(WebsiteProperties) = preProject
|
ProjectSection(WebsiteProperties) = preProject
|
||||||
UseIISExpress = "true"
|
UseIISExpress = "true"
|
||||||
|
|||||||
Reference in New Issue
Block a user