In less than 12 months, Drupal 7 will be end-of-life and no longer supported. Plan your upgrade to Drupal 10 now.

Why I've standardised on 'run' scripts

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.

- Oliver

P.S. If you're creating a new Drupal module, try my free Drupal module template.

Was this useful?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.