Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/colinbull/FAKE
Browse files Browse the repository at this point in the history
Conflicts:
	src/app/FakeLib/Globbing/Globbing.fs
  • Loading branch information
forki committed Mar 12, 2015
2 parents 984e988 + 9ebf320 commit 7f323ca
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 31 deletions.
8 changes: 4 additions & 4 deletions src/app/FAKE/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTitleAttribute("FAKE - F# Make Command line tool")>]
[<assembly: GuidAttribute("fb2b540f-d97a-4660-972f-5eeff8120fba")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
8 changes: 4 additions & 4 deletions src/app/Fake.Deploy.Lib/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTitleAttribute("FAKE - F# Make Deploy Lib")>]
[<assembly: GuidAttribute("AA284C42-1396-42CB-BCAC-D27F18D14AC7")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
8 changes: 4 additions & 4 deletions src/app/Fake.Deploy/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTitleAttribute("FAKE - F# Make Deploy tool")>]
[<assembly: GuidAttribute("413E2050-BECC-4FA6-87AA-5A74ACE9B8E1")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
8 changes: 4 additions & 4 deletions src/app/Fake.Experimental/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTitleAttribute("FAKE - F# Make Experimental Lib")>]
[<assembly: GuidAttribute("5AA28AED-B9D8-4158-A594-32FE5ABC5713")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
8 changes: 4 additions & 4 deletions src/app/Fake.SQL/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTitleAttribute("FAKE - F# Make SQL Lib")>]
[<assembly: GuidAttribute("A161EAAF-EFDA-4EF2-BD5A-4AD97439F1BE")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
8 changes: 4 additions & 4 deletions src/app/FakeLib/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ open System.Runtime.InteropServices
[<assembly: InternalsVisibleToAttribute("Test.FAKECore")>]
[<assembly: GuidAttribute("d6dd5aec-636d-4354-88d6-d66e094dadb5")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
2 changes: 2 additions & 0 deletions src/app/FakeLib/FileSystemHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
module Fake.FileSystemHelper

open System
open System.Text
open System.IO
open System.Runtime.InteropServices

/// Creates a DirectoryInfo for the given path.
let inline directoryInfo path = new DirectoryInfo(path)
Expand Down
10 changes: 7 additions & 3 deletions src/app/FakeLib/Globbing/Globbing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ let rec private buildPaths acc (input : SearchOption list) =
Seq.collect (fun dir -> Directory.EnumerateDirectories(dir, "*", SearchOption.AllDirectories)) acc
|> Seq.toList
buildPaths (acc @ dirs) t
| FilePattern(pattern) :: t -> Seq.collect (fun dir -> Directory.EnumerateFiles(dir, pattern)) acc |> Seq.toList
| FilePattern(pattern) :: t ->
Seq.collect (fun dir ->
if Directory.Exists(Path.Combine(dir, pattern))
then seq { yield Path.Combine(dir, pattern) }
else Directory.EnumerateFiles(dir, pattern)) acc |> Seq.toList

let private isDrive =
let regex = Regex(@"^[A-Za-z]:$", RegexOptions.Compiled)
Expand All @@ -64,7 +68,7 @@ let internal search (baseDir : string) (input : string) =
let baseDir = normalizePath baseDir
let input = normalizePath input
let input = input.Replace(baseDir, "")

let filePattern = Path.GetFileName(input)
input.Split([| '/'; '\\' |], StringSplitOptions.RemoveEmptyEntries)
|> Seq.map (function
Expand All @@ -74,4 +78,4 @@ let internal search (baseDir : string) (input : string) =
| a -> Directory(a))
|> Seq.toList
|> buildPaths [ baseDir ]
|> List.map normalizeOutputPath
|> List.map normalizeOutputPath
8 changes: 4 additions & 4 deletions src/deploy.web/Fake.Deploy.Web/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open System.Runtime.InteropServices
[<assembly: AssemblyTitleAttribute("FAKE - F# Make Deploy Web")>]
[<assembly: GuidAttribute("27BA7705-3F57-47BE-B607-8A46B27AE876")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("3.21.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.21.0")>]
[<assembly: AssemblyFileVersionAttribute("3.21.0")>]
[<assembly: AssemblyVersionAttribute("3.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.22.0")>]
[<assembly: AssemblyFileVersionAttribute("3.22.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.21.0"
let [<Literal>] Version = "3.22.0"
20 changes: 20 additions & 0 deletions src/test/Test.FAKECore/Globbing/TestSample1/FileSetSample1Specs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,24 @@ public class when_scanning_for_any_dll_and_starting_in_a_subfolder_and_going_up
It should_find_sample_app = () => Files.First().ShouldEndWith("SampleApp.dll");
It should_match_1_file = () => Files.Length.ShouldEqual(1);
}

public class when_scanning_folder_with_trialing_slash : when_extracting_zip
{
Because of = () => Files =
FileSystem
.Include("temptest/SampleApp/obj/")
.ToArray();

It should_match_1_file = () => Files.Length.ShouldEqual(1);
}

public class when_scanning_folder_without_trialing_slash : when_extracting_zip
{
Because of = () => Files =
FileSystem
.Include("temptest/SampleApp/obj")
.ToArray();

It should_match_1_file = () => Files.Length.ShouldEqual(1);
}
}

0 comments on commit 7f323ca

Please sign in to comment.