Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Cleans Paket.Unity3D directories in Unity3D projects when updating de…
Browse files Browse the repository at this point in the history
…pendencies
  • Loading branch information
devboy committed Nov 12, 2014
1 parent ebecfb1 commit aa6d835
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions src/Paket.Unity3D/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("Paket.Unity3D")>]
[<assembly: AssemblyProductAttribute("Paket.Unity3D")>]
[<assembly: AssemblyDescriptionAttribute("Piggy-backs ontop of Paket to add dependencies to Unity3D projects")>]
[<assembly: AssemblyVersionAttribute("0.0.4")>]
[<assembly: AssemblyFileVersionAttribute("0.0.4")>]
[<assembly: AssemblyVersionAttribute("0.0.5")>]
[<assembly: AssemblyFileVersionAttribute("0.0.5")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "0.0.4"
let [<Literal>] Version = "0.0.5"
8 changes: 8 additions & 0 deletions src/Paket.Unity3D/InstallProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aa6d835

Please sign in to comment.