GNU Make

Makefile tutorial GNU Make website

Make function used: shell

We are using Makefile for each repo to help:

  1. Download/sync dependencies.
  2. Run unit tests.
  3. Build binary.
  4. Package binary and build docker image.
  5. Push tagged docker image to repository.

Thus the Makefile can be easily integrated into CICD pipeline or run manually for regular development, for example:

1
2
3
4
5
6
7
8
# download dependencies
make vendor

# run unit tests
make test

# build, package and publish are 3 phonies defined in Makefile
make build package publish serivce=example version=chengdol-example-0.0.1
0%