Skip to content

Commit

Permalink
Orchard.proj and ClickToBuild.cmd: Adding additional parameter to bui…
Browse files Browse the repository at this point in the history
…ld using a custom solution. Fixes OrchardCMS#6627
  • Loading branch information
LombiqTechnologies authored and BenedekFarkas committed Mar 25, 2016
1 parent 9f4b842 commit ede741b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
11 changes: 6 additions & 5 deletions ClickToBuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ echo "Unable to detect suitable environment. Build may not succeed."

SET target=%1
SET project=%2
SET solution=%3

IF "%target%" == "" SET target=Build
IF "%project%" =="" SET project=Orchard.proj
IF "%project%" == "" SET project=Orchard.proj
IF "%solution%" == "" SET solution=src\Orchard.sln

lib\nuget\nuget.exe restore .\src\Orchard.sln
lib\nuget\nuget.exe restore %solution%

msbuild /t:%target% %project%

pause
msbuild /t:%target% %project% /p:Solution=%solution%

pause
19 changes: 11 additions & 8 deletions Orchard.proj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<BuildPlatform Condition="$(ProgramW6432) != ''">x64</BuildPlatform>
<BuildPlatform Condition="$(BuildPlatform) == ''">x86</BuildPlatform>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>

<OrchardSolution>$(SrcFolder)\Orchard.sln</OrchardSolution>
<Solution Condition="$(Solution) == ''">$(OrchardSolution)</Solution>

<!-- TeamCity build number -->
<Version>$(BUILD_NUMBER)</Version>
Expand All @@ -38,11 +41,11 @@

<!-- Coordinating Targets -->

<Target Name ="Build">
<Target Name="Build">
<CallTarget Targets="Clean"/>
<CallTarget Targets="Compile"/>
<CallTarget Targets="Test"/>
<CallTarget Targets="Package"/>
<CallTarget Targets="Package"/>
</Target>

<Target Name="FastBuild">
Expand Down Expand Up @@ -107,24 +110,24 @@
<!-- Building -->

<Target Name="Clean">
<MSBuild Projects="$(SrcFolder)\Orchard.sln" Targets="Clean" />
<MSBuild Projects="$(Solution)" Targets="Clean" />
<RemoveDir Directories="$(BuildFolder)" ContinueOnError="true"/>
<RemoveDir Directories="$(ArtifactsFolder)" />
</Target>

<Target Name="Compile">
<!-- Compile to "OutputFolder" -->
<MSBuild
Projects="$(SrcFolder)\Orchard.sln"
Projects="$(Solution)"
Targets="Build"
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
<!-- Compile to "regular" output folder for devs using VS locally -->
<MSBuild
Projects="$(SrcFolder)\Orchard.sln"
Projects="$(Solution)"
Targets="Build"/>
</Target>

<Target Name ="CompileMsBuildTasks">
<Target Name="CompileMsBuildTasks">
<MSBuild
Projects="$(SrcFolder)\Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj"
Targets="Build"
Expand All @@ -145,7 +148,7 @@

<!-- Testing -->

<Target Name ="Test">
<Target Name="Test">
<!-- TeamCity support -->
<ItemGroup>
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
Expand All @@ -160,7 +163,7 @@
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
</Target>

<Target Name ="Spec" DependsOnTargets="Package-Stage">
<Target Name="Spec" DependsOnTargets="Package-Stage">
<!-- TeamCity support -->
<ItemGroup>
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
Expand Down

0 comments on commit ede741b

Please sign in to comment.