by richardknop · 9y ago · 0 comments
- make test : run the entire test suite on local environment
- make ci : run the whole test suite (using docker compose so this can easily be executed by any CI server without having to install anything other than docker and docker-compose) and generate code coverage report, use linter tools to check code standards
- make install-deps : installs dependencies for current project
- make update-deps : will check if there is a newer version of dependencies available and install it
- make fmt : formats the code (replace spaces for tabs or vice-versa, remove additional whitespaces from beginning/end of files etc)
- make build : would compile and build a binary for current platform, I would also defined platform specific sub commands like make build-linux or make build-windows
It's great for going back to a project you haven't touched in months/years and then typing "make" to build it regardless of the language or tool chain.
I personally achieve the same result with a homebrew solution that uses bash exclusively (https://github.com/zweicoder/magic) but just curious to know why so many people prefer makefiles.
- make docker-build
- make docker-test
which are essentially wrappers around build/test, just in docker.
- make dev: stops, builds, and runs the code locally in a Docker container.