From 744cf8b22fa7539b8c58a15059bb2f82f90e3ce4 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 23 Nov 2023 19:18:38 +0000 Subject: [PATCH] docs(daily-email): add 2023-11-19 Why I've standardised on 'run' scripts --- src/content/daily-email/2023-11-19.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/content/daily-email/2023-11-19.md diff --git a/src/content/daily-email/2023-11-19.md b/src/content/daily-email/2023-11-19.md new file mode 100644 index 00000000..f2ac0886 --- /dev/null +++ b/src/content/daily-email/2023-11-19.md @@ -0,0 +1,26 @@ +--- +title: > + Why I've standardised on 'run' scripts +pubDate: 2023-11-19 +permalink: > + archive/2023/11/19/why-ive-standardised-on-run-scripts +tags: + - software-development + - continuous-integration +--- + +In some of my first emails to this list, I wrote about `just` and `run` files. + +Both allow you to write project-specific aliases and commands. For example, instead of running `docker compose exec php phpunit`, you run `just test` or `run test`. + +While `just` uses a simple Makefile-like syntax, it requires its own program, so it needs to be installed. + +While I have it installed locally, I've had instances where CI pipelines have failed because they can't download and install `just` and not because of an error in my code. + +## Here's the thing + +A `run` script is a file of Bash functions. + +Because it's written in Bash, it runs anywhere without installing additional dependencies. + +If a CI pipeline fails, which is less often, it's due to a failure within my code and not because of a download error.