111 строки
3.7 KiB
XML
111 строки
3.7 KiB
XML
<?xml version="1.0"?>
|
|
<project name="NUnitTestAdapter" default="build" basedir=".">
|
|
|
|
<description>
|
|
This script is used to build, test and package the NUnit VS adapter.
|
|
</description>
|
|
|
|
|
|
<!-- Set version number for package -->
|
|
<property name="package.version" value="1.0"/>
|
|
|
|
<!-- Define package name, including version -->
|
|
<property name="package.base.name" value="NUnitVisualStudioTestAdapter"/>
|
|
<property name="package.name" value="${package.base.name}-${package.version}"/>
|
|
|
|
<!-- Define various directories used -->
|
|
<property name="project.base.dir"
|
|
value="${project::get-base-directory()}"/>
|
|
<property name="project.package.dir"
|
|
value="${path::combine(project.base.dir,'package')}"/>
|
|
<property name="project.nuget.dir"
|
|
value="${path::combine(project.base.dir,'nuget')}"/>
|
|
<property name="project.lib.dir"
|
|
value="${path::combine(project.base.dir, 'lib')}"/>
|
|
|
|
<property name="package.working.dir"
|
|
value="${path::combine(project.package.dir, package.name)}"/>
|
|
<property name="install.release.dir"
|
|
value="${path::combine(project.base.dir, 'src\NUnitTestAdapterInstall\bin\Release')}"/>
|
|
|
|
<target name="build" description="Build the adapter (NYI)"/>
|
|
|
|
<target name="test" description="Test the adapter (NYI)"/>
|
|
|
|
<target name="package" desciption="Package the adapter"
|
|
depends="package-vsix,package-zip,package-nuget-1,package-nuget-2"/>
|
|
|
|
<target name="package-vsix">
|
|
|
|
<!-- Copy the vsix package, built by Visual Studio. -->
|
|
<property name="source.vsix.file" value="NUnitTestAdapter.vsix"/>
|
|
<property name="target.vsix.file" value="${package.name}.vsix"/>
|
|
<copy file="${path::combine(install.release.dir, source.vsix.file)}"
|
|
tofile="${path::combine(project.package.dir, target.vsix.file)}"/>
|
|
|
|
</target>
|
|
|
|
<target name="package-zip">
|
|
|
|
<!-- Create the working directory -->
|
|
<mkdir dir="${package.working.dir}"/>
|
|
|
|
<!-- Copy binaries to the working directory for zipping. -->
|
|
<copy todir="${package.working.dir}">
|
|
<fileset basedir="${install.release.dir}">
|
|
<include name="NUnit.VisualStudio.TestAdapter.dll"/>
|
|
<include name="nunit.util.dll"/>
|
|
<include name="nunit.core.dll"/>
|
|
<include name="nunit.core.interfaces.dll"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<!-- Create the zip package -->
|
|
<property name="zip.file.name" value="${package.name}.zip"/>
|
|
<zip ziplevel="9"
|
|
zipfile="${project.package.dir}/${zip.file.name}">
|
|
<fileset basedir="${package.working.dir}" prefix="${package.name}">
|
|
<include name="**"/>
|
|
</fileset>
|
|
</zip>
|
|
|
|
</target>
|
|
|
|
<target name="package-nuget-1">
|
|
|
|
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapter"/>
|
|
<property name="nuget.internal.id" value="NUnitTestAdapter"/>
|
|
<call target="create-nuget-package"/>
|
|
|
|
</target>
|
|
|
|
<target name="package-nuget-2">
|
|
|
|
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapterAndFramework"/>
|
|
<property name="nuget.internal.id" value="NUnitTestAdapter.WithFramework"/>
|
|
<call target="create-nuget-package"/>
|
|
|
|
</target>
|
|
|
|
<target name="create-nuget-package">
|
|
|
|
<copy file="${project.nuget.dir}/${nuget.package.name}.nuspec"
|
|
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nuspec"
|
|
overwrite="true">
|
|
<filterchain>
|
|
<expandproperties/>
|
|
</filterchain>
|
|
</copy>
|
|
|
|
<exec program="NuGet.exe"
|
|
workingdir="${project.package.dir}"
|
|
commandline="pack ${nuget.package.name}-${package.version}.nuspec" />
|
|
|
|
<move file="${project.package.dir}/${nuget.internal.id}.${package.version}.nupkg"
|
|
tofile="${project.package.dir}/${nuget.package.name}-${package.version}.nupkg"/>
|
|
|
|
</target>
|
|
|
|
</project>
|
|
|