Skip to content

Commit

Permalink
Pack only supported files - references #2415
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jun 12, 2017
1 parent 095384c commit 83f73a8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### 5.0.0-rc007 - 12.06.2017
#### 5.0.0-rc008 - 12.06.2017
* New command `paket generate-nuspec`
* New Command: `FixNuspecs` - Can fix a list of nuspec files now
* BREAKING CHANGE: Paket simplify no longer support simplifying restrictions (https://github.com/fsprojects/Paket/pull/2336)
Expand Down
4 changes: 2 additions & 2 deletions src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
[assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")]
[assembly: AssemblyVersionAttribute("5.0.0")]
[assembly: AssemblyFileVersionAttribute("5.0.0")]
[assembly: AssemblyInformationalVersionAttribute("5.0.0-rc007")]
[assembly: AssemblyInformationalVersionAttribute("5.0.0-rc008")]
namespace System {
internal static class AssemblyVersionInformation {
internal const System.String AssemblyTitle = "Paket.Bootstrapper";
internal const System.String AssemblyProduct = "Paket";
internal const System.String AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories.";
internal const System.String AssemblyVersion = "5.0.0";
internal const System.String AssemblyFileVersion = "5.0.0";
internal const System.String AssemblyInformationalVersion = "5.0.0-rc007";
internal const System.String AssemblyInformationalVersion = "5.0.0-rc008";
}
}
4 changes: 2 additions & 2 deletions src/Paket.Core/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ open System.Reflection
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("5.0.0")>]
[<assembly: AssemblyFileVersionAttribute("5.0.0")>]
[<assembly: AssemblyInformationalVersionAttribute("5.0.0-rc007")>]
[<assembly: AssemblyInformationalVersionAttribute("5.0.0-rc008")>]
do ()

module internal AssemblyVersionInformation =
Expand All @@ -18,4 +18,4 @@ module internal AssemblyVersionInformation =
let [<Literal>] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."
let [<Literal>] AssemblyVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
let [<Literal>] AssemblyInformationalVersion = "5.0.0-rc007"
let [<Literal>] AssemblyInformationalVersion = "5.0.0-rc008"
16 changes: 12 additions & 4 deletions src/Paket.Core/PaketConfigFiles/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ type ProjectFile =
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module ProjectFile =

let isSupportedFile (fi:FileInfo) =
fi.Extension = ".csproj" || fi.Extension = ".fsproj" || fi.Extension = ".vbproj" || fi.Extension = ".wixproj" || fi.Extension = ".nproj" || fi.Extension = ".vcxproj"

let name (projectFile:ProjectFile) = FileInfo(projectFile.FileName).Name

let nameWithoutExtension (projectFile:ProjectFile) = Path.GetFileNameWithoutExtension (name projectFile)
Expand Down Expand Up @@ -196,7 +199,12 @@ module ProjectFile =

let tryLoad(fileName:string) =
try
Some(loadFromFile fileName)
if String.IsNullOrWhiteSpace fileName then None else
let fi = FileInfo fileName
if isSupportedFile fi then
Some(loadFromFile fileName)
else
None
with
| exn ->
traceWarnfn "Unable to parse project %s:%s %s" fileName Environment.NewLine exn.Message
Expand Down Expand Up @@ -1656,8 +1664,8 @@ type ProjectFile with
|> search

findAllFiles(folder, "*proj*")
|> Array.filter (fun f -> f.Extension = ".csproj" || f.Extension = ".fsproj" || f.Extension = ".vbproj" || f.Extension = ".wixproj" || f.Extension = ".nproj" || f.Extension = ".vcxproj")

|> Array.filter ProjectFile.isSupportedFile
/// Finds all project files
static member FindAllProjects folder : ProjectFile [] =
ProjectFile.FindAllProjectFiles folder
Expand Down Expand Up @@ -1745,7 +1753,7 @@ type ProjectFile with
| Some cproj ->
if not (progFileCache.ContainsKey rid) then
progFileCache.Add(rid,cproj)
delivered.Add rid
delivered.Add rid |> ignore
cproj :: acc
| None -> acc
else acc
Expand Down
4 changes: 2 additions & 2 deletions src/Paket.Core/PublicAPI.fs
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,9 @@ type Dependencies(dependenciesFileName: string) =
|> Array.choose (fun proj -> proj.FindTemplatesFile())
|> Array.choose (fun path ->
try
Some(TemplateFile.Load(path, lockFile, None, Map.empty))
Some(TemplateFile.Load(path, lockFile, None, Map.empty))
with
| _ -> None)
| _ -> None)
|> Array.toList


Expand Down
4 changes: 2 additions & 2 deletions src/Paket/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ open System.Reflection
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("5.0.0")>]
[<assembly: AssemblyFileVersionAttribute("5.0.0")>]
[<assembly: AssemblyInformationalVersionAttribute("5.0.0-rc007")>]
[<assembly: AssemblyInformationalVersionAttribute("5.0.0-rc008")>]
do ()

module internal AssemblyVersionInformation =
Expand All @@ -18,4 +18,4 @@ module internal AssemblyVersionInformation =
let [<Literal>] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."
let [<Literal>] AssemblyVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
let [<Literal>] AssemblyInformationalVersion = "5.0.0-rc007"
let [<Literal>] AssemblyInformationalVersion = "5.0.0-rc008"

0 comments on commit 83f73a8

Please sign in to comment.