etcd icon indicating copy to clipboard operation
etcd copied to clipboard

Re-organize Bash scripts

Open ivanvc opened this issue 2 months ago • 2 comments

What would you like to be added?

This is a follow-up on https://github.com/etcd-io/etcd/pull/20850#discussion_r2459235292.

Currently, our Bash scripts follow a custom convention of defining the Makefile targets as "passes" that are in the scripts/{test,build,etc}.sh files. This custom (and undocumented) way of maintaining the scripts is difficult to follow by new contributors. Because of this, we currently don't have a standard and have a lot of duplication in our Makefile, spread across different files, and approaches to run these targets/functionality.

Examples of fragmented architecture

  1. Custom "PASSES" framework: https://github.com/etcd-io/etcd/blob/855c9ba31e1a1ab58eb30368baeb873760325cef/Makefile#L109-L111
  2. Executing a Bash script: https://github.com/etcd-io/etcd/blob/855c9ba31e1a1ab58eb30368baeb873760325cef/Makefile#L229-L231
  3. Embedded scripts in the Makefile target: https://github.com/etcd-io/etcd/blob/855c9ba31e1a1ab58eb30368baeb873760325cef/Makefile#L171-L178

We want to simplify and standardize this, without creating a difficult custom framework to implement and maintain.

Why is this needed?

To improve the maintainability of our Bash scripts.

ivanvc avatar Oct 24 '25 18:10 ivanvc