Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Terrabuild.Common.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -174,7 +169,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
38 changes: 0 additions & 38 deletions src/Terrabuild.Common/IO.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ open System.IO
open Microsoft.Extensions.FileSystemGlobbing
open Collections
open System
open Ignore

let chmod permissions (path: string) =
File.SetUnixFileMode(path, permissions)
Expand Down Expand Up @@ -108,40 +107,3 @@ let createSnapshot outputs projectDirectory =
|> Map
{ TimestampedFiles = files }



let loadIgnoreFile dir =
let ignoreAccumulator = Ignore()
let rec combineIgnoreFiles dir =
if FS.combinePath dir "WORKSPACE" |> exists |> not then
match dir |> FS.parentDirectory with
| Some dir -> dir |> combineIgnoreFiles
| _ -> ()

let ignoreFile = FS.combinePath dir ".gitignore"
if FS.fileExists ignoreFile then
let content = File.ReadAllLines ignoreFile
content |> ignoreAccumulator.Add |> ignore

dir |> combineIgnoreFiles
ignoreAccumulator

let enumeratedCommittedFiles projectDir =

let rec enumeratedCommittedFiles (dirIgnore: Ignore) dir = [
// enumerate whitelisted files
yield! dir |> enumerateFiles |> List.filter (not << dirIgnore.IsIgnored)

// enumerate whitelisted directories
let dirs = dir |> enumerateDirs |> List.filter (not << dirIgnore.IsIgnored)
for subdir in dirs do
// update ignore if new .gitignore file discovered
let ignoreFile = FS.combinePath dir ".gitignore"
let subDirIgnore =
if FS.fileExists ignoreFile then Ignore().Add(dirIgnore.OriginalRules).Add(File.ReadAllLines ignoreFile)
else dirIgnore
yield! enumeratedCommittedFiles subDirIgnore subdir
]

let projectDirIgnore = loadIgnoreFile projectDir
enumeratedCommittedFiles projectDirIgnore projectDir
1 change: 0 additions & 1 deletion src/Terrabuild.Common/Terrabuild.Common.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Ignore" Version="0.2.1" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="9.0.8" />
<PackageReference Include="FSharp.SystemTextJson" Version="1.4.36" />
</ItemGroup>
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Common/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Direct",
"requested": "[0.2.1, )",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Direct",
"requested": "[9.0.8, )",
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Configuration.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@
"FSharp.Core": "4.6.2"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -191,7 +186,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Configuration/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
"FSharp.Core": "4.6.2"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "9.0.8",
Expand All @@ -55,7 +50,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Expressions.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -174,7 +169,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Expressions/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "9.0.8",
Expand All @@ -38,7 +33,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Extensions.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -174,7 +169,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Extensions/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "9.0.8",
Expand All @@ -38,7 +33,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Lang.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@
"FSharp.Core": "4.6.2"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -191,7 +186,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Lang/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
"FSharp.Core": "4.6.2"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "9.0.8",
Expand All @@ -56,7 +51,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.PubSub.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -174,7 +169,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.PubSub/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "9.0.8",
Expand All @@ -38,7 +33,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Scripting.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.23.0",
Expand Down Expand Up @@ -206,7 +201,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Terrabuild.Scripting/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@
"System.Text.Json": "6.0.10"
}
},
"Ignore": {
"type": "Transitive",
"resolved": "0.2.1",
"contentHash": "Qw3s0pTwK3o6Iv6kTMjmxzOt91pczU533OmtAvFRsJ7PdCVMhGCRyUkMsCOI7ejxOtHJdRsj141HeZWeedlqkQ=="
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "9.0.8",
Expand Down Expand Up @@ -89,7 +84,6 @@
"dependencies": {
"FSharp.Core": "[9.0.303, )",
"FSharp.SystemTextJson": "[1.4.36, )",
"Ignore": "[0.2.1, )",
"Microsoft.Extensions.FileSystemGlobbing": "[9.0.8, )",
"System.Text.Json": "[9.0.0, )"
}
Expand Down
Loading