tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 455 forks source link

Update the dependencies in the vendor folder from my private repository #510

Closed josesanchezr closed 6 years ago

josesanchezr commented 8 years ago

When I do changes in some library that is in other project but into my private repository and I want pass those changes to the same library that I have into the vendor folder, I could not do it.

I have made the following changes in the LoadVCSAndUpdate function, for it can update individually our library that we have changed in the GOPATH and pass that change to the vendor folder of our main project folder:

I changed the index in repoMask of deps [i] .root to deps [i] .ImportPath, since it was overwriting with other dependencies that we are importing in our main project that are within the same repository.

In the loop that add a dependency to "Update" slice, I modified for to get the entries for repoMask map obtained by the new index d.ImportPath.

Note: The root contains the "import repo path to root" and the libraries we have within a project is always the same. The ImportPath contains the import that we made in our main project.

Example: This is an example of what you want to do.

/GOPATH
    /github.com
    /my_repo
        /mainproject
            main.go
            /internal_library
                ...
            /Godeps
            /vendor
            ...
        /library1
            ...
        /library2
            ...

With this change the "godep update library1" work.

freeformz commented 6 years ago

Thanks, but I am closing this PR because the repo is going to be archived.