Skip to content

Build Toolλ︎

A build tool is used to assemble a piece of software so that it can be run and simple to distribute.

Build tools can support a wide range of development tasks and provide a common and consistent set of commands across all projects.

  • build packages software to run
  • dist creates a package of the software for distribution to others to install
  • clean removes files created during the build

GNU Make is a long established tool that can be used to run any command line task. Tasks are defined in a Makefile which is very expressive and simple to follow.

Tool Summaryλ︎

Common task namingλ︎

Tasks used across Practicalli projects follow the make standard targets for users

all , test-ci , deps and dist targets are recommended for use with a CI deployment pipeline and builder stage when using Docker.

  • all calling all targets to prepare the application to be run. e.g. all: deps test-ci dist clean
  • deps download library dependencies (depend on deps.edn file)
  • dist create a distribution tar file for this program or zip deployment package for AWS Lambda
  • lint run lint tools to check code quality - e.g MegaLinter which provides a wide range of tools
  • format-check report format and style issues for a specific programming language
  • format-fix update source code files if there are format and style issues for a specific programming language
  • pre-commit run unit tests and code quality targets before considering a Git commit
  • repl run an interactive run-time environment for the programming language
  • test-unit run all unit tests
  • test-ci test running in CI build (optionally focus on integration testing)
  • clean remove files created by any of the commands from other targets (i.e. ensure a clean build each time)

practicalli/dotfiles/Makefile also defines docker targets to build and compose images locally, inspect images and prune containers and images.