-
-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1202 from patriksvensson/feature/GH1184
GH1184: Added support for manually including/excluding files for tools
- Loading branch information
Showing
22 changed files
with
332 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ internal enum GlobTokenKind | |
Identifier, | ||
WindowsRoot, | ||
Parent, | ||
Current, | ||
EndOfText | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Diagnostics; | ||
|
||
namespace Cake.Core.IO.Globbing.Nodes | ||
{ | ||
[DebuggerDisplay(".")] | ||
internal sealed class CurrentSegment : GlobNode | ||
{ | ||
[DebuggerStepThrough] | ||
public override void Accept(GlobVisitor visitor, GlobVisitorContext context) | ||
{ | ||
visitor.VisitCurrent(this, context); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/Cake.NuGet.Tests/Fixtures/NuGetToolContentResolverFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using Cake.Core; | ||
using Cake.Core.IO; | ||
using Cake.Core.Packaging; | ||
|
||
namespace Cake.NuGet.Tests.Fixtures | ||
{ | ||
internal sealed class NuGetToolContentResolverFixture : NuGetContentResolverFixture | ||
{ | ||
// This is a resolver without the addin assemblies method | ||
// which is not needed for resolving tools. | ||
private sealed class NuGetToolContentResolver : NuGetContentResolver | ||
{ | ||
public NuGetToolContentResolver(IFileSystem fileSystem, ICakeEnvironment environment, IGlobber globber) | ||
: base(fileSystem, environment, globber) | ||
{ | ||
} | ||
|
||
protected override IReadOnlyCollection<IFile> GetAddinAssemblies(DirectoryPath path) | ||
{ | ||
throw new NotSupportedException("Only tools can be resolved with this resolver."); | ||
} | ||
} | ||
|
||
public NuGetToolContentResolverFixture(string uri) | ||
: base(".NETFramework,Version=v4.5") | ||
{ | ||
Package = new PackageReference(uri); | ||
PackageType = PackageType.Tool; | ||
Path = new DirectoryPath(string.Concat("/Working/tools/", Package.Package)); | ||
} | ||
|
||
protected override INuGetContentResolver GetResolver() | ||
{ | ||
return new NuGetToolContentResolver(FileSystem, Environment, Globber); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.