robfig / glock

MIT License
230 stars 27 forks source link

Support GLOCKFILEs not at repo root #13

Closed robfig closed 9 years ago

robfig commented 10 years ago

From https://groups.google.com/d/msg/golang-nuts/dc0hIrbWX_U/3nUD7Hb8Xq0J

metakeule commented 9 years ago

I would really help us if you could implement this. Our setup is the following:

this is what the projects directory looks like

projects/
             project1/     // <- GOPATH and git repository
                           .gitignore  // contains bin, pkg, src/github.com, src/bitbucket.org
                           static/  // contains static files
                           pkg
                           bin
                           src/
                               GLOCKFILE // here please the glockfile
                                github.com
                                bitbucket.org
                                app1
                                app2

each project has a gosublime config that is setting up the GOPATH to the project directory and adds the bin subdir to the path.

(there is also a general GOPATH that is only used for library development, not using glock - its bin directory is also a part of $PATH for general commands)

It would be great if the above scenario would be supported (including the hook).

robfig commented 9 years ago

Finally got around to doing this, with one difference from your description - the GLOCKFILE must still be present in a package , not at the root of src. Otherwise, there's no way to know which packages are the source to be managed (which determines the root of dependency determination). Your example should be able to work if you put app1 and app2 under a common company/ package, where the GLOCKFILE would go.

Please let me know if it works for you!

Thanks, Rob