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.
buildpackages software to rundistcreates a package of the software for distribution to others to installcleanremoves 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λ︎
- GNU make - language agnostic build tool, define any tasks
- babashka task runner - write a build tool using Clojure syntax
Common task namingλ︎
Tasks used across Practicalli projects follow the make standard targets for users
all,test-ci,depsanddisttargets are recommended for use with a CI deployment pipeline and builder stage when using Docker.
allcalling all targets to prepare the application to be run. e.g.all: deps test-ci dist cleandepsdownload library dependencies (depend ondeps.ednfile)distcreate a distribution tar file for this program or zip deployment package for AWS Lambdalintrun lint tools to check code quality - e.g MegaLinter which provides a wide range of toolsformat-checkreport format and style issues for a specific programming languageformat-fixupdate source code files if there are format and style issues for a specific programming languagepre-commitrun unit tests and code quality targets before considering a Git commitreplrun an interactive run-time environment for the programming languagetest-unitrun all unit teststest-citest running in CI build (optionally focus on integration testing)cleanremove 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.