etcd-io / etcd-io/etcd

Re-organize Bash scripts

Open
#20,856 7 comments 1 reaction 2 assignees Claimed by @Himanshu-370 View on GitHub
contribfest stage/tracked type/feature
Dominant language
Go
Stars
52.3k
Forks
10.5k
Avg merge
2d 21h
Merged PRs (30d)
43

Description

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.