Create Cake build script
This commit is contained in:
Родитель
4841ea3242
Коммит
2f89052e95
|
@ -18,6 +18,13 @@ build/
|
|||
# Ignore output folder named package
|
||||
package/
|
||||
|
||||
# Ignore tools directory except for packages.config
|
||||
tools/
|
||||
!tools/packages.config
|
||||
|
||||
# Ignore NUnit TestResult
|
||||
TestResult.xml
|
||||
|
||||
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
||||
!packages/*/build/
|
||||
# Disable NuGet packages folder
|
||||
|
|
Двоичные данные
NUnitTestAdapter.sln
Двоичные данные
NUnitTestAdapter.sln
Двоичный файл не отображается.
|
@ -0,0 +1,13 @@
|
|||
version: 2.1.{build}
|
||||
image: Visual Studio 2015
|
||||
|
||||
build_script:
|
||||
- ps: .\build.ps1 -Target "Appveyor"
|
||||
|
||||
# disable built-in tests.
|
||||
test: off
|
||||
|
||||
artifacts:
|
||||
- path: package\*.nupkg
|
||||
- path: package\*.vsix
|
||||
- path: package\*.zip
|
|
@ -0,0 +1,264 @@
|
|||
#tool nuget:?package=NUnit.Runners&version=2.6.4
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// ARGUMENTS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var target = Argument("target", "Default");
|
||||
var configuration = Argument("configuration", "Debug");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// SET PACKAGE VERSION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var version = "2.1.0";
|
||||
var modifier = "";
|
||||
|
||||
var dbgSuffix = configuration == "Debug" ? "-dbg" : "";
|
||||
var packageVersion = version + modifier + dbgSuffix;
|
||||
|
||||
if (BuildSystem.IsRunningOnAppVeyor)
|
||||
{
|
||||
var tag = AppVeyor.Environment.Repository.Tag;
|
||||
|
||||
if (tag.IsTag)
|
||||
{
|
||||
packageVersion = tag.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
var buildNumber = AppVeyor.Environment.Build.Number;
|
||||
packageVersion = version + "-CI-" + buildNumber + dbgSuffix;
|
||||
if (AppVeyor.Environment.PullRequest.IsPullRequest)
|
||||
packageVersion += "-PR-" + AppVeyor.Environment.PullRequest.Number;
|
||||
else
|
||||
packageVersion += "-" + AppVeyor.Environment.Repository.Branch;
|
||||
}
|
||||
|
||||
AppVeyor.UpdateBuildVersion(packageVersion);
|
||||
}
|
||||
|
||||
var packageName = "NUnitTestAdapter-" + packageVersion;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// DEFINE RUN CONSTANTS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Directories
|
||||
var PROJECT_DIR = Context.Environment.WorkingDirectory.FullPath + "/";
|
||||
var PACKAGE_DIR = PROJECT_DIR + "package/";
|
||||
var PACKAGE_IMAGE_DIR = PACKAGE_DIR + packageName + "/";
|
||||
var TOOLS_DIR = PROJECT_DIR + "tools/";
|
||||
var BIN_DIR = PROJECT_DIR + "bin/" + configuration + "/";
|
||||
var DEMO_BIN_DIR = PROJECT_DIR + "src/NUnitTestDemo/NUnitTestDemo/bin/" + configuration + "/";
|
||||
|
||||
// Solutions
|
||||
var ADAPTER_SOLUTION = PROJECT_DIR + "NUnitTestAdapter.sln";
|
||||
var DEMO_SOLUTION = PROJECT_DIR + "src/NUnitTestDemo/NUnitTestDemo.sln";
|
||||
|
||||
// Test Runners
|
||||
var NUNIT_CONSOLE = TOOLS_DIR + "NUnit.Runners/tools/nunit-console.exe";
|
||||
|
||||
// Test Assemblies
|
||||
var ADAPTER_TESTS = BIN_DIR + "NUnit.VisualStudio.TestAdapter.Tests.dll";
|
||||
var DEMO_TESTS = DEMO_BIN_DIR + "NUnitTestDemo.dll";
|
||||
|
||||
// Custom settings for VSTest
|
||||
var VSTestCustomSettings = new VSTestSettings()
|
||||
{
|
||||
ArgumentCustomization = args => args.Append("/TestAdapterPath:" + BIN_DIR)
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// CLEAN
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
CleanDirectory(BIN_DIR);
|
||||
CleanDirectory(DEMO_BIN_DIR);
|
||||
});
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// INITIALIZE FOR BUILD
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("NuGetRestore")
|
||||
.Does(() =>
|
||||
{
|
||||
NuGetRestore(ADAPTER_SOLUTION);
|
||||
NuGetRestore(DEMO_SOLUTION);
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// BUILD
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Build")
|
||||
.IsDependentOn("NuGetRestore")
|
||||
.Does(() =>
|
||||
{
|
||||
BuildSolution(ADAPTER_SOLUTION, configuration);
|
||||
BuildSolution(DEMO_SOLUTION, configuration);
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TEST
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("TestAdapterUsingConsole")
|
||||
.IsDependentOn("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
int rc = StartProcess(
|
||||
NUNIT_CONSOLE,
|
||||
new ProcessSettings()
|
||||
{
|
||||
Arguments = ADAPTER_TESTS
|
||||
});
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
var message = rc > 0
|
||||
? string.Format("Test failure: {0} tests failed", rc)
|
||||
: string.Format("Test exited with rc = {0}", rc);
|
||||
|
||||
throw new CakeException(message);
|
||||
}
|
||||
});
|
||||
|
||||
Task("TestAdapterUsingVSTest")
|
||||
.IsDependentOn("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
VSTest(ADAPTER_TESTS, VSTestCustomSettings);
|
||||
});
|
||||
|
||||
Task("TestDemo")
|
||||
.IsDependentOn("Build")
|
||||
.Does(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
VSTest(DEMO_TESTS, VSTestCustomSettings);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Information("\nNOTE: Demo tests failed as expected.");
|
||||
Information("This is normally not an error.\n");
|
||||
}
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// PACKAGE
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("CreatePackageDir")
|
||||
.Does(() =>
|
||||
{
|
||||
CreateDirectory(PACKAGE_DIR);
|
||||
});
|
||||
|
||||
Task("CreateWorkingImage")
|
||||
.IsDependentOn("Build")
|
||||
.IsDependentOn("CreatePackageDir")
|
||||
.Does(() =>
|
||||
{
|
||||
CreateDirectory(PACKAGE_IMAGE_DIR);
|
||||
CleanDirectory(PACKAGE_IMAGE_DIR);
|
||||
|
||||
CopyFileToDirectory("LICENSE.txt", PACKAGE_IMAGE_DIR);
|
||||
|
||||
var binFiles = new FilePath[]
|
||||
{
|
||||
BIN_DIR + "NUnit.VisualStudio.TestAdapter.dll",
|
||||
BIN_DIR + "Mono.Cecil.dll",
|
||||
BIN_DIR + "Mono.Cecil.Pdb.dll",
|
||||
BIN_DIR + "Mono.Cecil.Mdb.dll",
|
||||
BIN_DIR + "Mono.Cecil.Rocks.dll",
|
||||
BIN_DIR + "nunit.core.dll",
|
||||
BIN_DIR + "nunit.core.interfaces.dll",
|
||||
BIN_DIR + "nunit.util.dll"
|
||||
};
|
||||
|
||||
var binDir = PACKAGE_IMAGE_DIR + "bin/";
|
||||
CreateDirectory(binDir);
|
||||
CopyFiles(binFiles, binDir);
|
||||
});
|
||||
|
||||
Task("PackageZip")
|
||||
.IsDependentOn("CreateWorkingImage")
|
||||
.Does(() =>
|
||||
{
|
||||
Zip(PACKAGE_IMAGE_DIR, File(PACKAGE_DIR + packageName + ".zip"));
|
||||
});
|
||||
|
||||
Task("PackageNuGet")
|
||||
.IsDependentOn("CreateWorkingImage")
|
||||
.Does(() =>
|
||||
{
|
||||
NuGetPack("nuget/NUnitVisualStudioTestAdapter.nuspec", new NuGetPackSettings()
|
||||
{
|
||||
Version = packageVersion,
|
||||
BasePath = PACKAGE_IMAGE_DIR,
|
||||
OutputDirectory = PACKAGE_DIR
|
||||
});
|
||||
});
|
||||
|
||||
Task("PackageVsix")
|
||||
.IsDependentOn("Build")
|
||||
.IsDependentOn("CreatePackageDir")
|
||||
.Does(() =>
|
||||
{
|
||||
CopyFile(
|
||||
BIN_DIR + "NUnitTestAdapter.vsix",
|
||||
PACKAGE_DIR + packageName + ".vsix");
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// HELPER METHODS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void BuildSolution(string solutionPath, string configuration)
|
||||
{
|
||||
MSBuild(solutionPath, new MSBuildSettings()
|
||||
.SetConfiguration(configuration)
|
||||
.SetMSBuildPlatform(MSBuildPlatform.x86)
|
||||
.SetVerbosity(Verbosity.Minimal)
|
||||
.SetNodeReuse(false)
|
||||
);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Rebuild")
|
||||
.IsDependentOn("Clean")
|
||||
.IsDependentOn("Build");
|
||||
|
||||
Task("Test")
|
||||
.IsDependentOn("TestAdapterUsingConsole")
|
||||
.IsDependentOn("TestAdapterUsingVSTest");
|
||||
|
||||
Task("Package")
|
||||
.IsDependentOn("Build")
|
||||
.IsDependentOn("PackageZip")
|
||||
.IsDependentOn("PackageNuGet")
|
||||
.IsDependentOn("PackageVsix");
|
||||
|
||||
Task("Appveyor")
|
||||
.IsDependentOn("Build")
|
||||
.IsDependentOn("Test")
|
||||
.IsDependentOn("Package");
|
||||
|
||||
Task("Default")
|
||||
.IsDependentOn("Build");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// EXECUTION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
RunTarget(target);
|
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
powershell ./build.ps1 %CAKE_ARGS% %*
|
|
@ -0,0 +1,145 @@
|
|||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
# Feel free to change this file to fit your needs.
|
||||
##########################################################################
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This is a Powershell script to bootstrap a Cake build.
|
||||
|
||||
.DESCRIPTION
|
||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
||||
and execute your Cake build script with the parameters you provide.
|
||||
|
||||
.PARAMETER Script
|
||||
The build script to execute.
|
||||
.PARAMETER Target
|
||||
The build script target to run.
|
||||
.PARAMETER Configuration
|
||||
The build configuration to use.
|
||||
.PARAMETER Verbosity
|
||||
Specifies the amount of information to be displayed.
|
||||
.PARAMETER Experimental
|
||||
Tells Cake to use the latest Roslyn release.
|
||||
.PARAMETER WhatIf
|
||||
Performs a dry run of the build script.
|
||||
No tasks will be executed.
|
||||
.PARAMETER Mono
|
||||
Tells Cake to use the Mono scripting engine.
|
||||
.PARAMETER SkipToolPackageRestore
|
||||
Skips restoring of packages.
|
||||
.PARAMETER ScriptArgs
|
||||
Remaining arguments are added here.
|
||||
|
||||
.LINK
|
||||
http://cakebuild.net
|
||||
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[string]$Script = "build.cake",
|
||||
[string]$Target = "Default",
|
||||
[string]$Configuration = "Release",
|
||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
||||
[string]$Verbosity = "Verbose",
|
||||
[switch]$Experimental,
|
||||
[Alias("DryRun","Noop")]
|
||||
[switch]$WhatIf,
|
||||
[switch]$Mono,
|
||||
[switch]$SkipToolPackageRestore,
|
||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||
[string[]]$ScriptArgs
|
||||
)
|
||||
|
||||
Write-Host "Preparing to run build script..."
|
||||
|
||||
$PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition;
|
||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
||||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
||||
$NUGET_URL = "http://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
||||
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
||||
|
||||
# Should we use mono?
|
||||
$UseMono = "";
|
||||
if($Mono.IsPresent) {
|
||||
Write-Verbose -Message "Using the Mono based scripting engine."
|
||||
$UseMono = "-mono"
|
||||
}
|
||||
|
||||
# Should we use the new Roslyn?
|
||||
$UseExperimental = "";
|
||||
if($Experimental.IsPresent -and !($Mono.IsPresent)) {
|
||||
Write-Verbose -Message "Using experimental version of Roslyn."
|
||||
$UseExperimental = "-experimental"
|
||||
}
|
||||
|
||||
# Is this a dry run?d
|
||||
$UseDryRun = "";
|
||||
if($WhatIf.IsPresent) {
|
||||
$UseDryRun = "-dryrun"
|
||||
}
|
||||
|
||||
# Make sure tools folder exists
|
||||
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
||||
Write-Verbose -Message "Creating tools directory..."
|
||||
New-Item -Path $TOOLS_DIR -Type directory | out-null
|
||||
}
|
||||
|
||||
# Make sure that packages.config exist.
|
||||
if (!(Test-Path $PACKAGES_CONFIG)) {
|
||||
Write-Verbose -Message "Downloading packages.config..."
|
||||
try { Invoke-WebRequest -Uri http://cakebuild.net/download/bootstrapper/packages -OutFile $PACKAGES_CONFIG } catch {
|
||||
Throw "Could not download packages.config."
|
||||
}
|
||||
}
|
||||
|
||||
# Try find NuGet.exe in path if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
|
||||
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_) }
|
||||
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
||||
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
||||
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
||||
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Try download NuGet.exe if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Downloading NuGet.exe..."
|
||||
try {
|
||||
(New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE)
|
||||
} catch {
|
||||
Throw "Could not download NuGet.exe."
|
||||
}
|
||||
}
|
||||
|
||||
# Save nuget.exe path to environment to be available to child processed
|
||||
$ENV:NUGET_EXE = $NUGET_EXE
|
||||
|
||||
# Restore tools from NuGet?
|
||||
if(-Not $SkipToolPackageRestore.IsPresent) {
|
||||
Push-Location
|
||||
Set-Location $TOOLS_DIR
|
||||
Write-Verbose -Message "Restoring tools from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occured while restoring NuGet tools."
|
||||
}
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Make sure that Cake has been installed.
|
||||
if (!(Test-Path $CAKE_EXE)) {
|
||||
Throw "Could not find Cake.exe at $CAKE_EXE"
|
||||
}
|
||||
|
||||
# Start Cake
|
||||
Write-Host "Running build script..."
|
||||
Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
|
||||
exit $LASTEXITCODE
|
1
nant.bat
1
nant.bat
|
@ -1 +0,0 @@
|
|||
D:\DevTools\nant-0.92\bin\NAnt.exe %*
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>NUnitTestAdapter</id>
|
||||
<version>${package.version}</version>
|
||||
<version>$version$</version>
|
||||
<title>NUnit Test Adapter for VS2012 and VS2013</title>
|
||||
<authors>NUnit Software</authors>
|
||||
<owners>NUnit Software</owners>
|
||||
|
@ -20,15 +20,15 @@ The package works with Visual Studio 2012 from RTM, and all Updates, and with Vi
|
|||
<tags>test visualstudio testadapter</tags>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="../LICENSE.txt" />
|
||||
<file src="${package.working.dir}\nunit.core.dll" target="lib\nunit.core.dll" />
|
||||
<file src="${package.working.dir}\nunit.core.interfaces.dll" target="lib\nunit.core.interfaces.dll" />
|
||||
<file src="${package.working.dir}\nunit.util.dll" target="lib\nunit.util.dll" />
|
||||
<file src="${package.working.dir}\NUnit.VisualStudio.TestAdapter.dll" target="lib\NUnit.VisualStudio.TestAdapter.dll" />
|
||||
<file src="${package.working.dir}\Mono.Cecil.dll" target="lib\Mono.Cecil.dll" />
|
||||
<file src="${package.working.dir}\Mono.Cecil.Mdb.dll" target="lib\Mono.Cecil.Mdb.dll" />
|
||||
<file src="${package.working.dir}\Mono.Cecil.Pdb.dll" target="lib\Mono.Cecil.Pdb.dll" />
|
||||
<file src="${package.working.dir}\Mono.Cecil.Rocks.dll" target="lib\Mono.Cecil.Rocks.dll" />
|
||||
<file src="..\nuget\install.ps1" target="tools\install.ps1" />
|
||||
<file src="LICENSE.txt" />
|
||||
<file src="bin\nunit.core.dll" target="lib\nunit.core.dll" />
|
||||
<file src="bin\nunit.core.interfaces.dll" target="lib\nunit.core.interfaces.dll" />
|
||||
<file src="bin\nunit.util.dll" target="lib\nunit.util.dll" />
|
||||
<file src="bin\NUnit.VisualStudio.TestAdapter.dll" target="lib\NUnit.VisualStudio.TestAdapter.dll" />
|
||||
<file src="bin\Mono.Cecil.dll" target="lib\Mono.Cecil.dll" />
|
||||
<file src="bin\Mono.Cecil.Mdb.dll" target="lib\Mono.Cecil.Mdb.dll" />
|
||||
<file src="bin\Mono.Cecil.Pdb.dll" target="lib\Mono.Cecil.Pdb.dll" />
|
||||
<file src="bin\Mono.Cecil.Rocks.dll" target="lib\Mono.Cecil.Rocks.dll" />
|
||||
<file src="..\..\nuget\install.ps1" target="tools\install.ps1" />
|
||||
</files>
|
||||
</package>
|
|
@ -1,106 +0,0 @@
|
|||
<?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="2.0.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"/>
|
||||
|
||||
<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"/>
|
||||
<include name="Mono.Cecil.dll"/>
|
||||
<include name="Mono.Cecil.Mdb.dll"/>
|
||||
<include name="Mono.Cecil.Pdb.dll"/>
|
||||
<include name="Mono.Cecil.Rocks.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">
|
||||
|
||||
<property name="nuget.package.name" value="NUnitVisualStudioTestAdapter"/>
|
||||
<property name="nuget.internal.id" value="NUnitTestAdapter"/>
|
||||
<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="tools/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>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
private static readonly string ThisAssemblyPath =
|
||||
Path.GetFullPath("NUnit.VisualStudio.TestAdapter.Tests.dll");
|
||||
private static readonly string ThisCodeFile =
|
||||
Path.GetFullPath(@"..\..\NUnitEventListenerTests.cs");
|
||||
Path.GetFullPath(@"..\..\src\NUnitTestAdapterTests\NUnitEventListenerTests.cs");
|
||||
|
||||
private const int LineNumber = 29; // Must be number of the following line
|
||||
// ReSharper disable once UnusedMember.Local
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NUnit.VisualStudio.TestAdapter.Tests
|
|||
private static readonly string ThisAssemblyPath =
|
||||
Path.GetFullPath("NUnit.VisualStudio.TestAdapter.Tests.dll");
|
||||
private static readonly string ThisCodeFile =
|
||||
Path.GetFullPath(@"..\..\TestConverterTests.cs");
|
||||
Path.GetFullPath(@"..\..\src\NUnitTestAdapterTests\TestConverterTests.cs");
|
||||
|
||||
// NOTE: If the location of the FakeTestCase method in the
|
||||
// file changes, update the value of FAKE_LINE_NUMBER.
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Cake" version="0.13.0" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче