Makefile buff-ification#3700
Conversation
sreya
left a comment
There was a problem hiding this comment.
The changes look good although they ultimately make the Makefile less approachable for others to modify. I'm more excited about faster builds though 🚀
This is unfortunate, and I've tried to make things as easy to modify as possible by making all the knobs configurable at the top of the file with variables. Makefiles are complicated for a repo with as many targets and dependency links as ours sadly. |
kylecarbs
left a comment
There was a problem hiding this comment.
Just two minor things. Unfortunately, this adds complexity to the Makefile, but it was adding complexity to the bash before, so it seems like an overall positive change to me!
| release: $(CODER_FAT_BINARIES) $(CODER_ALL_ARCHIVES) $(CODER_ALL_PACKAGES) $(CODER_ALL_ARCH_IMAGES) build/coder_helm_$(VERSION).tgz | ||
| .PHONY: release |
There was a problem hiding this comment.
Could we use this target in CI?
There was a problem hiding this comment.
We can potentially in the future after I make the changes to build darwin on linux, but we can't yet.
This caused the following issues: - Slim binaries weren't being updated. - The coder.tar.ztd was misplaced. - There is no coder.sha1 file with proper filenames. This should be reintroduced in a future change with those fixes.
Gets rid of sequential go builds in favor of concurrent ones.
New targets
Time savings
For all 7 slim binaries: 30s vs 88s (~66% time saving)
For an entire release build (minus Docker image pushing): 68s vs 250s (~72% time saving)
TODO:
addprefix