etcd
etcd copied to clipboard
Re-organize Bash scripts
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
- Custom "PASSES" framework: https://github.com/etcd-io/etcd/blob/855c9ba31e1a1ab58eb30368baeb873760325cef/Makefile#L109-L111
- Executing a Bash script: https://github.com/etcd-io/etcd/blob/855c9ba31e1a1ab58eb30368baeb873760325cef/Makefile#L229-L231
- Embedded scripts in the
Makefiletarget: 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.