Updating cake build so packaging no longer depends on building
This commit is contained in:
Родитель
b4e1b7c76a
Коммит
2c5e3d748a
|
@ -310,3 +310,4 @@ __pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
# Cake - Uncomment if you are using it
|
# Cake - Uncomment if you are using it
|
||||||
tools/
|
tools/
|
||||||
|
!tools/packages.config
|
||||||
|
|
20
build.cake
20
build.cake
|
@ -1,5 +1,3 @@
|
||||||
#tool nuget:?package=NUnit.ConsoleRunner&version=3.5.0
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// ARGUMENTS
|
// ARGUMENTS
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -65,6 +63,7 @@ var packageName = "NUnit3TestAdapter-" + packageVersion;
|
||||||
var PROJECT_DIR = Context.Environment.WorkingDirectory.FullPath + "/";
|
var PROJECT_DIR = Context.Environment.WorkingDirectory.FullPath + "/";
|
||||||
var PACKAGE_DIR = PROJECT_DIR + "package/";
|
var PACKAGE_DIR = PROJECT_DIR + "package/";
|
||||||
var PACKAGE_IMAGE_DIR = PACKAGE_DIR + packageName + "/";
|
var PACKAGE_IMAGE_DIR = PACKAGE_DIR + packageName + "/";
|
||||||
|
var SRC_DIR = PROJECT_DIR + "src/";
|
||||||
var TOOLS_DIR = PROJECT_DIR + "tools/";
|
var TOOLS_DIR = PROJECT_DIR + "tools/";
|
||||||
var BIN_DIR = PROJECT_DIR + "bin/" + configuration + "/";
|
var BIN_DIR = PROJECT_DIR + "bin/" + configuration + "/";
|
||||||
var DEMO_BIN_DIR = PROJECT_DIR + "demo/NUnitTestDemo/bin/" + configuration + "/";
|
var DEMO_BIN_DIR = PROJECT_DIR + "demo/NUnitTestDemo/bin/" + configuration + "/";
|
||||||
|
@ -179,7 +178,6 @@ Task("CreatePackageDir")
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("CreateWorkingImage")
|
Task("CreateWorkingImage")
|
||||||
.IsDependentOn("Build")
|
|
||||||
.IsDependentOn("CreatePackageDir")
|
.IsDependentOn("CreatePackageDir")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
|
@ -213,7 +211,7 @@ Task("PackageZip")
|
||||||
|
|
||||||
Task("PackageNuGet")
|
Task("PackageNuGet")
|
||||||
.IsDependentOn("CreateWorkingImage")
|
.IsDependentOn("CreateWorkingImage")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
NuGetPack("nuget/NUnit3TestAdapter.nuspec", new NuGetPackSettings()
|
NuGetPack("nuget/NUnit3TestAdapter.nuspec", new NuGetPackSettings()
|
||||||
{
|
{
|
||||||
|
@ -224,12 +222,11 @@ Task("PackageNuGet")
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("PackageVsix")
|
Task("PackageVsix")
|
||||||
.IsDependentOn("Build")
|
|
||||||
.IsDependentOn("CreatePackageDir")
|
.IsDependentOn("CreatePackageDir")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
CopyFile(
|
CopyFile(
|
||||||
BIN_DIR + "NUnit3TestAdapter.vsix",
|
BIN_DIR + "NUnit3TestAdapter.vsix",
|
||||||
PACKAGE_DIR + packageName + ".vsix");
|
PACKAGE_DIR + packageName + ".vsix");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -239,12 +236,10 @@ Task("PackageVsix")
|
||||||
|
|
||||||
void BuildSolution(string solutionPath, string configuration)
|
void BuildSolution(string solutionPath, string configuration)
|
||||||
{
|
{
|
||||||
MSBuild(solutionPath, new MSBuildSettings()
|
DotNetBuild(solutionPath, settings =>
|
||||||
.SetConfiguration(configuration)
|
settings.SetConfiguration(configuration)
|
||||||
.SetMSBuildPlatform(MSBuildPlatform.x86)
|
.WithTarget("Build")
|
||||||
.SetVerbosity(Verbosity.Minimal)
|
.WithProperty("NodeReuse", "false"));
|
||||||
.SetNodeReuse(false)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -260,7 +255,6 @@ Task("Test")
|
||||||
.IsDependentOn("TestAdapterUsingVSTest");
|
.IsDependentOn("TestAdapterUsingVSTest");
|
||||||
|
|
||||||
Task("Package")
|
Task("Package")
|
||||||
.IsDependentOn("Build")
|
|
||||||
.IsDependentOn("PackageZip")
|
.IsDependentOn("PackageZip")
|
||||||
.IsDependentOn("PackageNuGet")
|
.IsDependentOn("PackageNuGet")
|
||||||
.IsDependentOn("PackageVsix");
|
.IsDependentOn("PackageVsix");
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
<Error Condition="!Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets')" />
|
<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.0.25907-RC2\build\Microsoft.VSSDK.BuildTools.targets')" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Cake" version="0.15.2" />
|
<package id="Cake" version="0.15.2" />
|
||||||
<package id="NUnit.ConsoleRunner" version="3.4.1" />
|
<package id="NUnit.ConsoleRunner" version="3.5.0" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче