cloudflare / hellogopher

Hellogopher: "just clone and make" your conventional Go project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: provide a way to update hellogopher

zbentley opened this issue · comments

If I'm using hellogopher's Makefile in a project, it would be nice to be able to update the build system via the build system. If hellogopher changes after I've installed it, it should be simple (one command, if possible) to pull in the latest Makefile.

Ideas (in no particular order):

  • Document using a git submodule for hellogopher. Drawbacks: requires a subdirectory, adds complexity, changes pretty much all of the usage, and submodules are also a little bit evil, so probably not a great idea.
  • Have the setup target either automatically re-download, or check and prompts the user for redownload of, an updated Makefile. Drawbacks: setup now wants internet access, or may time out.
  • Add a new target update-makefile or something that gets and overwrites (provided Git says there are no changes to) the updated Makefile. Drawbacks: has to be relatively git-aware. Should also probably move the old file to .old or similar.

Hi, thanks for your feedback!

I've considered how to make hellogopher modular or update-able, and I never came to a satisfying conclusion. The Makefile is meant to be modified, and the sections that could be moved to an imported .mak amount to less than 60 lines. The import logic would probably add 30 lines.

So the unsatisfactory conclusion I came to is what is written at the top here

https://github.com/cloudflare/hellogopher/blob/master/CHANGELOG.md

I can obviously be convinced otherwise, but I did already consider the methods you suggested and didn't find a way to make them work :(

No worries. Thanks for the explanation!