Closed mcandre closed 6 months ago
Using a pattern of makefile
provisioning scripts (or install.mk
, for projects that already use a toplevel makefile
for build tasks). Linting the provisioning script with unmake.
They're boring, POSIX makefiles with a default all
task that runs the provisioning steps. A local maximum of all manner of portability, reliability, minimalism, community support, etc. etc. constraints.
makefiles would not work well for projects that use autotools (C/C++), cmake (C/C++), or Makefile.PL (Perl).
One workaround is to write sh scripts with the commands restricted to a reduced polyglot syntax, e.g. double-quotes only, no single-quotes. Then the poor Command Prompt / PowerShell Windows user could in theory copy and paste the commands manually into their terminal to perform provisioning.
batsh would help here.
Ansible works, though we would want to use the OS distribution provided Ansible, to avoid a paradox where we need Ansible to obtain Python and pip, in order to obtain Ansible.