diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c62fd4c..0c4385b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 0.0.5 - November 12 2014 +* Cleans `Paket.Unity3D` directories in Unity3D projects when updating dependencies + #### 0.0.4 - November 8 2014 * Not a prerelease anymore diff --git a/src/Paket.Unity3D/AssemblyInfo.fs b/src/Paket.Unity3D/AssemblyInfo.fs index a31e337..6387397 100644 --- a/src/Paket.Unity3D/AssemblyInfo.fs +++ b/src/Paket.Unity3D/AssemblyInfo.fs @@ -4,9 +4,9 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = - let [] Version = "0.0.4" + let [] Version = "0.0.5" diff --git a/src/Paket.Unity3D/InstallProcess.fs b/src/Paket.Unity3D/InstallProcess.fs index 8654f44..4e0d793 100644 --- a/src/Paket.Unity3D/InstallProcess.fs +++ b/src/Paket.Unity3D/InstallProcess.fs @@ -6,6 +6,12 @@ open Paket.Logging open System.IO open System.Collections.Generic +let private cleanTargetDirectories (unityProject:Unity3DReferencesFile) = + Constants.PluginDirs + |> List.map (fun pd -> Path.Combine(unityProject.UnityAssetsDir, pd, Constants.Unity3DCopyFolderName)) + |> List.append [Path.Combine(unityProject.UnityAssetsDir, Constants.Unity3DCopyFolderName)] + |> List.iter (fun dir -> Utils.CleanDir dir) + let private findPackagesWithContent (usedPackages:Dictionary<_,_>) = usedPackages |> Seq.map (fun kv -> kv.Key, DirectoryInfo(Path.Combine("packages", kv.Key, "content"))) @@ -70,6 +76,8 @@ let Install(sources,force, hard, lockFile:LockFile) = for unityProject in applicableProjects do verbosefn "Installing to %s" unityProject.UnityAssetsDir + cleanTargetDirectories unityProject + let usedPackages = lockFile.GetPackageHull(unityProject.ReferencesFile) usedPackages