Skip to content

Commit

Permalink
Fixed invalid Cache Folder when Current Directory is different - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Sep 3, 2016
1 parent d8042e4 commit 77ff611
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 22 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 3.18.1 - 03.09.2016
* BUGFIX: Fixed invalid Cache Folder when Current Directory is different - https://github.com/fsprojects/Paket/issues/1910

#### 3.18.0 - 02.09.2016
* BUGFIX: Fixed issues around .NET Standard resolution
* BUGFIX: Fixed toLower > tolower for odata url parameter - https://github.com/fsprojects/Paket/pull/1906
Expand Down
10 changes: 5 additions & 5 deletions src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
[assembly: AssemblyTitleAttribute("Paket.Bootstrapper")]
[assembly: AssemblyProductAttribute("Paket")]
[assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")]
[assembly: AssemblyVersionAttribute("3.18.0")]
[assembly: AssemblyFileVersionAttribute("3.18.0")]
[assembly: AssemblyInformationalVersionAttribute("3.18.0")]
[assembly: AssemblyVersionAttribute("3.18.1")]
[assembly: AssemblyFileVersionAttribute("3.18.1")]
[assembly: AssemblyInformationalVersionAttribute("3.18.1")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "3.18.0";
internal const string InformationalVersion = "3.18.0";
internal const string Version = "3.18.1";
internal const string InformationalVersion = "3.18.1";
}
}
10 changes: 5 additions & 5 deletions src/Paket.Core/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("Paket")>]
[<assembly: AssemblyCompanyAttribute("Paket team")>]
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("3.18.0")>]
[<assembly: AssemblyFileVersionAttribute("3.18.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.18.0")>]
[<assembly: AssemblyVersionAttribute("3.18.1")>]
[<assembly: AssemblyFileVersionAttribute("3.18.1")>]
[<assembly: AssemblyInformationalVersionAttribute("3.18.1")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.18.0"
let [<Literal>] InformationalVersion = "3.18.0"
let [<Literal>] Version = "3.18.1"
let [<Literal>] InformationalVersion = "3.18.1"
6 changes: 6 additions & 0 deletions src/Paket.Core/Cache.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ type Cache =
{ Location : string
CacheType : CacheType option }

member this.BaseOnRoot root =
if Path.IsPathRooted this.Location && not(String.IsNullOrWhiteSpace root) then
this
else
{ this with Location = Path.Combine(root,this.Location) |> normalizePath }

static member Parse(line : string) =
let sourceRegex = Regex("cache[ ]*[\"]([^\"]*)[\"]", RegexOptions.IgnoreCase)
let parts = line.Split ' '
Expand Down
8 changes: 7 additions & 1 deletion src/Paket.Core/DependenciesFileParser.fs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,13 @@ module DependenciesFileParser =
| Group(newGroupName) -> lineNo, DependenciesGroup.New(GroupName newGroupName)::current::other
| Empty(_) -> lineNo, current::other
| Remote(RemoteParserOption.PackageSource newSource) -> lineNo, { current with Sources = current.Sources @ [newSource] |> List.distinct }::other
| Remote(RemoteParserOption.Cache newCache) ->
| Remote(RemoteParserOption.Cache newCache) ->
let newCache =
if String.IsNullOrWhiteSpace fileName then
newCache
else
let fi = FileInfo fileName
newCache.BaseOnRoot(fi.Directory.FullName)
let caches = current.Caches @ [newCache] |> List.distinct
let sources = current.Sources @ [LocalNuGet(newCache.Location,Some newCache)] |> List.distinct
lineNo, { current with Caches = caches; Sources = sources }::other
Expand Down
5 changes: 4 additions & 1 deletion src/Paket.Core/Utils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@ let askYesNo question =

getAnswer()

let inline normalizePath(path:string) = path.Replace("\\",Path.DirectorySeparatorChar.ToString()).Replace("/",Path.DirectorySeparatorChar.ToString()).TrimEnd(Path.DirectorySeparatorChar)

let dirSeparator = Path.DirectorySeparatorChar.ToString()

let inline normalizePath(path:string) = path.Replace("\\",dirSeparator).Replace("/",dirSeparator).TrimEnd(Path.DirectorySeparatorChar).Replace(dirSeparator + "." + dirSeparator, dirSeparator)
let inline windowsPath (path:string) = path.Replace(Path.DirectorySeparatorChar, '\\')
/// Gets all files with the given pattern
let inline FindAllFiles(folder, pattern) = DirectoryInfo(folder).GetFiles(pattern, SearchOption.AllDirectories)
Expand Down
10 changes: 5 additions & 5 deletions src/Paket.PowerShell/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("Paket")>]
[<assembly: AssemblyCompanyAttribute("Paket team")>]
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("3.18.0")>]
[<assembly: AssemblyFileVersionAttribute("3.18.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.18.0")>]
[<assembly: AssemblyVersionAttribute("3.18.1")>]
[<assembly: AssemblyFileVersionAttribute("3.18.1")>]
[<assembly: AssemblyInformationalVersionAttribute("3.18.1")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.18.0"
let [<Literal>] InformationalVersion = "3.18.0"
let [<Literal>] Version = "3.18.1"
let [<Literal>] InformationalVersion = "3.18.1"
10 changes: 5 additions & 5 deletions src/Paket/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("Paket")>]
[<assembly: AssemblyCompanyAttribute("Paket team")>]
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("3.18.0")>]
[<assembly: AssemblyFileVersionAttribute("3.18.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.18.0")>]
[<assembly: AssemblyVersionAttribute("3.18.1")>]
[<assembly: AssemblyFileVersionAttribute("3.18.1")>]
[<assembly: AssemblyInformationalVersionAttribute("3.18.1")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "3.18.0"
let [<Literal>] InformationalVersion = "3.18.0"
let [<Literal>] Version = "3.18.1"
let [<Literal>] InformationalVersion = "3.18.1"

0 comments on commit 77ff611

Please sign in to comment.