Skip to content

Commit

Permalink
Make sure right dotnet.exe tooling used for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead committed Apr 17, 2017
1 parent 5965629 commit 518468f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -4,6 +4,12 @@
Task("Cake.Common.Tools.DotNetCore.DotNetCoreAliases.Setup")
.Does(() =>
{
var dotnetExePath = Paths.TestRoot.CombineWithFilePath(Context.IsRunningOnUnix() ? ".dotnet/dotnet" : ".dotnet/dotnet.exe");
if (FileExists(dotnetExePath))
{
Context.Tools.RegisterFile(dotnetExePath);
}
var sourcePath = Paths.Resources.Combine("./Cake.Common/Tools/DotNetCore");
var targetPath = Paths.Temp.Combine("./Cake.Common/Tools/DotNetCore");
EnsureDirectoryExist(targetPath.Combine("../").Collapse());
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/utilities/paths.cake
@@ -1,10 +1,12 @@
public static class Paths
{
public static DirectoryPath TestRoot { get; private set; }
public static DirectoryPath Temp { get; private set; }
public static DirectoryPath Resources { get; private set; }

public static void Initialize(ICakeContext context)
{
TestRoot = new DirectoryPath("./").MakeAbsolute(context.Environment);
Temp = new DirectoryPath("./temp").MakeAbsolute(context.Environment);
Resources = new DirectoryPath("./resources").MakeAbsolute(context.Environment);
}
Expand Down

0 comments on commit 518468f

Please sign in to comment.