Skip to content

Remove unused code in build scripts #1410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 3 additions & 69 deletions build-common/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,14 @@
<property name="nant-version.current" value="${assemblyname::get-version(assembly::get-name(nant::get-assembly()))}" />
<property name="nant-version.required" value="0.91.4312.0" /> <!-- Nant 0.91 release version -->

<!--
Path to the folder that contain the external assemblies. For net-2.0 the values will
be lib, lib/net, and lib/net/2.0 respectively.
-->
<!-- Path to the folder that contain the external assemblies -->
<property name="lib.dir" value="lib" dynamic="true" />
<property name="lib.family.dir" value="${path::combine(lib.dir, framework::get-family(framework::get-target-framework()))}" dynamic="true" />
<property name="lib.framework.dir" value="${path::combine(lib.family.dir, version::to-string(framework::get-version()))}" dynamic="true" />

<!-- This is used only for build folder -->
<!-- TODO: Either remove or refactor to use NHibernate.props -->
<property name="project.version" value="5.0.0" overwrite="false" />
<property name="project.version.numeric" value="5.0.0" overwrite="false" />

<!-- debug|release -->
<property name="build.defines" value="" />

<!-- platform specific properties. These are the defaults -->
<property name="current.build.defines" value="${build.defines}" />

<!-- properties used to connect to database for testing -->
<include buildfile="nhibernate-properties.xml" />

Expand All @@ -70,65 +59,10 @@

<property name="build.root.dir" value="${root.dir}/build/${build.name}" />
<property name="build.dir" value="${build.root.dir}" />
<property name="bin.dir" value="${build.dir}/bin/${nant.settings.currentframework}" />
<property name="bin.dir" value="${build.dir}/bin" />
<property name="testresults.dir" value="${bin.dir}/test-results" />
<property name="tools.dir" value="${root.dir}/Tools"/>
</target>



<target name="set-framework-configuration">
<if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}">
<fail message="The '${framework::get-target-framework()}' framework is not supported by this version of NHibernate." />
</if>
<call target="set-${framework::get-target-framework()}-framework-configuration" />
</target>

<target name="set-net-4.0-framework-configuration">
<property name="nant.settings.currentframework" value="net-4.0" />
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" />
<!-- not using SDK_v2_0 because ndoc throws an exception -->
<property name="link.sdkdoc.version" value="SDK_v1_1" />
<!-- merge should work with 4.0 when compiling for 4.0 -->
<property name="merge.targetplatform" value="v4" />
<property name="referenceassemblies.dir" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1" />
</target>

<target name="set-net-3.5-framework-configuration">
<property name="nant.settings.currentframework" value="net-3.5" />
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5" />
<!-- not using SDK_v2_0 because ndoc throws an exception -->
<property name="link.sdkdoc.version" value="SDK_v1_1" />
<!-- merge should work with 2.0 when compiling for 3.5 -->
<property name="merge.targetplatform" value="v2" />
<property name="referenceassemblies.dir" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\v3.5" />
</target>

<target name="set-net-2.0-framework-configuration">
<property name="nant.settings.currentframework" value="net-2.0" />
<property name="current.build.defines" value="${build.defines}NET,NET_2_0" />
<!-- not using SDK_v2_0 because ndoc throws an exception -->
<property name="link.sdkdoc.version" value="SDK_v1_1" />
<property name="merge.targetplatform" value="v2" />
</target>


<target name="set-mono-3.5-framework-configuration">
<property name="nant.settings.currentframework" value="mono-3.5" />
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5,MONO" />
<!-- not using SDK_v2_0 because ndoc throws an exception -->
<property name="link.sdkdoc.version" value="SDK_v1_1" />
<!-- merge should work with 2.0 when compiling for 3.5 -->
<property name="merge.targetplatform" value="v2" />
</target>

<target name="set-mono-2.0-framework-configuration">
<property name="nant.settings.currentframework" value="mono-2.0" />
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,MONO" />
<!-- not using SDK_v2_0 because ndoc throws an exception -->
<property name="link.sdkdoc.version" value="SDK_v1_1" />
<property name="merge.targetplatform" value="v2" />
</target>

<target name="display-current-runtime">
<echo message="" />
Expand All @@ -146,7 +80,7 @@
</target>

<target name="common.init"
depends="set-framework-configuration set-project-configuration"
depends="set-project-configuration"
description="Initializes build properties">

<fileset id="project.sources" failonempty="true">
Expand Down
28 changes: 0 additions & 28 deletions default.build
Original file line number Diff line number Diff line change
Expand Up @@ -76,38 +76,10 @@
<nant buildfile="doc/documentation.build" target="api" />
</target>

<target name="build-all-frameworks" depends="init">
<!-- Save the current framework -->
<property name="current.framework.saved" value="${nant.settings.currentframework}" />

<!-- Execute build for each framework -->
<foreach item="String" delim=" " property="framework" in="${supported.frameworks}">
<call target="set-${framework}-framework-configuration" />
<call target="build" />
</foreach>

<!-- Reset the current framework to the saved value -->
<call target="set-${current.framework.saved}-framework-configuration" />
</target>

<target name="binaries" depends="init">
<call target="build" />
</target>

<target name="test-all-frameworks" depends="init">
<!-- Save the current framework -->
<property name="current.framework.saved" value="${nant.settings.currentframework}" />

<!-- Execute build for each framework -->
<foreach item="String" delim=" " property="framework" in="${supported.frameworks}">
<call target="set-${framework}-framework-configuration" />
<call target="test" />
</foreach>

<!-- Reset the current framework to the saved value -->
<call target="set-${current.framework.saved}-framework-configuration" />
</target>

<target name="reports" depends="init">
<call target="test-all-frameworks" />
<call target="test-report" />
Expand Down