From 738beaec0efa0171c77f073f74b83edda210b8e5 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 24 Jun 2016 12:11:23 +0200 Subject: [PATCH] Add --ignore-checks parameter for restore - references #1750 --- .../Properties/AssemblyInfo.cs | 4 ++-- src/Paket.Core/AssemblyInfo.fs | 4 ++-- src/Paket.Core/DependencyChangeDetection.fs | 2 ++ src/Paket.Core/RestoreProcess.fs | 16 ++++++++-------- src/Paket.PowerShell/AssemblyInfo.fs | 4 ++-- src/Paket/AssemblyInfo.fs | 4 ++-- src/Paket/Paket.fsproj | 2 +- 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs index fa3c3270ce..630cade546 100644 --- a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs +++ b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs @@ -6,10 +6,10 @@ [assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")] [assembly: AssemblyVersionAttribute("3.2.0")] [assembly: AssemblyFileVersionAttribute("3.2.0")] -[assembly: AssemblyInformationalVersionAttribute("3.2.0-alpha004")] +[assembly: AssemblyInformationalVersionAttribute("3.2.0-alpha005")] namespace System { internal static class AssemblyVersionInformation { internal const string Version = "3.2.0"; - internal const string InformationalVersion = "3.2.0-alpha004"; + internal const string InformationalVersion = "3.2.0-alpha005"; } } diff --git a/src/Paket.Core/AssemblyInfo.fs b/src/Paket.Core/AssemblyInfo.fs index d7cf8564d0..66c90c7dd1 100644 --- a/src/Paket.Core/AssemblyInfo.fs +++ b/src/Paket.Core/AssemblyInfo.fs @@ -7,9 +7,9 @@ open System.Reflection [] [] [] -[] +[] do () module internal AssemblyVersionInformation = let [] Version = "3.2.0" - let [] InformationalVersion = "3.2.0-alpha004" + let [] InformationalVersion = "3.2.0-alpha005" diff --git a/src/Paket.Core/DependencyChangeDetection.fs b/src/Paket.Core/DependencyChangeDetection.fs index 79b37d20eb..eb51916a42 100644 --- a/src/Paket.Core/DependencyChangeDetection.fs +++ b/src/Paket.Core/DependencyChangeDetection.fs @@ -141,11 +141,13 @@ let findRemoteFileChangesInDependenciesFile(dependenciesFile:DependenciesFile,lo let lockFileRemoteFiles = lockFilegroup.RemoteFiles |> List.map RemoteFileChange.CreateResolvedVersion + |> List.map (fun r -> if r.Commit = None then r else { r with Commit = Some "" }) |> Set.ofList let dependenciesFileRemoteFiles = dependenciesFileGroup.RemoteFiles |> List.map RemoteFileChange.CreateUnresolvedVersion + |> List.map (fun r -> if r.Commit = None then r else { r with Commit = Some "" }) |> Set.ofList let u = diff --git a/src/Paket.Core/RestoreProcess.fs b/src/Paket.Core/RestoreProcess.fs index 503dd37e27..99f484c5ef 100644 --- a/src/Paket.Core/RestoreProcess.fs +++ b/src/Paket.Core/RestoreProcess.fs @@ -119,17 +119,17 @@ let Restore(dependenciesFileName,force,group,referencesFileNames,ignoreChecks) = failwithf "%s doesn't exist." lockFileName.FullName let dependenciesFile = DependenciesFile.ReadFromFile(dependenciesFileName) - let localFile = + let lockFile,localFile,hasLocalFile = + let lockFile = LockFile.LoadFrom(lockFileName.FullName) if not localFileName.Exists then - LocalFile.empty + lockFile,LocalFile.empty,false else - LocalFile.readFile localFileName.FullName - |> Chessie.ErrorHandling.Trial.returnOrFail - let lockFile = - LockFile.LoadFrom(lockFileName.FullName) - |> LocalFile.overrideLockFile localFile + let localFile = + LocalFile.readFile localFileName.FullName + |> Chessie.ErrorHandling.Trial.returnOrFail + LocalFile.overrideLockFile localFile lockFile,localFile,false - if not ignoreChecks then + if not (hasLocalFile || ignoreChecks) then let hasAnyChanges,_,_,_ = DependencyChangeDetection.GetChanges(dependenciesFile,lockFile,false) if hasAnyChanges then diff --git a/src/Paket.PowerShell/AssemblyInfo.fs b/src/Paket.PowerShell/AssemblyInfo.fs index f170f67b90..1ca8dd813e 100644 --- a/src/Paket.PowerShell/AssemblyInfo.fs +++ b/src/Paket.PowerShell/AssemblyInfo.fs @@ -7,9 +7,9 @@ open System.Reflection [] [] [] -[] +[] do () module internal AssemblyVersionInformation = let [] Version = "3.2.0" - let [] InformationalVersion = "3.2.0-alpha004" + let [] InformationalVersion = "3.2.0-alpha005" diff --git a/src/Paket/AssemblyInfo.fs b/src/Paket/AssemblyInfo.fs index 0252690bdc..b1a273678a 100644 --- a/src/Paket/AssemblyInfo.fs +++ b/src/Paket/AssemblyInfo.fs @@ -7,9 +7,9 @@ open System.Reflection [] [] [] -[] +[] do () module internal AssemblyVersionInformation = let [] Version = "3.2.0" - let [] InformationalVersion = "3.2.0-alpha004" + let [] InformationalVersion = "3.2.0-alpha005" diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index c30797909d..c6d2130827 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -52,7 +52,7 @@ update -f D:\code\Paket\integrationtests\scenarios\i001117-aws\temp restore - D:\code\paket3dotnetcoreissue + D:\code\Paket\integrationtests\scenarios\i001353-git-build-as-source-restore\temp 11