Skip to content

Commit c60040a

Browse files
committed
chore: switch back to Github Flow because of Lerna limitations
1 parent be68f40 commit c60040a

File tree

4 files changed

+37
-16
lines changed

4 files changed

+37
-16
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,9 @@ Log4brains follows a **simplified Git Flow** model. Here’s how the process wor
103103
npm install log4brains@beta
104104
```
105105

106-
This helps us get feedback from early adopters before merging changes into `stable`, and thus triggering a stable release.
106+
This helps us get feedback from early adopters before triggering a stable release.
107107

108-
7. **Releasing to Stable**: Once the `develop` branch is stable and tested, the maintainers will merge it into `stable`, and run manually `scripts/release.sh` + `make -C docker release version-tag branch-tag latest-tag` to publish a new stable release to npm (TODO: should be automated in the future).
109-
110-
### Urgent hotfix specific case
111-
112-
In the rare case that an urgent hotfix is needed on the current stable version while not wanting to release the `develop` branch yet, you can follow this process:
113-
114-
1. Create a new branch from `stable` (instead of `develop`)
115-
2. Develop and test
116-
3. Submit a Pull Request to `stable` (instead of `develop`)
117-
4. A maintainer will review, merge and release the patch
118-
5. Then the maintainer will merge `stable` into `develop` to ensure the hotfix is ported to the beta version
108+
7. **Stable Release**: Once the `develop` branch is stable and tested, the maintainers will manually run `scripts/release.sh` + `make -C docker release version-tag branch-tag latest-tag` to publish a new stable release to npm (TODO: should be automated in the future).
119109

120110
## License
121111

@@ -128,7 +118,7 @@ As discussed in [discussion #108](https://github.com/thomvaill/log4brains/discus
128118
To make it easier I introduce two co-maintainer roles:
129119

130120
- **Canary Maintainers**: in charge of triaging issues, reviewing PRs, and can merge them into `develop` (and thus trigger a beta release)
131-
- **Core Maintainers**: in charge of the project's overall direction and vision, of releasing stable versions, and can merge `develop` into `stable` (and thus trigger a stable release)
121+
- **Core Maintainers**: in charge of the project's overall direction and vision, and of releasing stable versions
132122

133123
If you're interested in becoming a co-maintainer, you can start your "Mentorship Phase" by participating in code reviews and helping triage issues. This will help us assess your familiarity with the project and the workflow.
134124

docs/adr/20240926-transition-to-simplified-git-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Transition to Simplified Git Flow
22

3-
- Status: draft
3+
- Status: superseded by [20241217-switch-back-to-github-flow](20241217-switch-back-to-github-flow.md)
44
- Date: 2024-09-26
55

66
## Context and Problem Statement
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Switch back to GitHub Flow, but keeping the automated beta releases
2+
3+
- Status: accepted
4+
- Date: 2024-12-17
5+
6+
## Context and Problem Statement
7+
8+
The previous decision to adopt a Simplified Git Flow with a `develop` and `stable` branch aimed to provide clearer separation between development and releases while enabling automated beta releases. However, we faced tooling limitations.
9+
10+
Specifically, **Lerna**, which we use for managing our monorepo, does not integrate well with Git Flow processes ([Lerna issue #2023](https://github.com/lerna/lerna/issues/2023#issuecomment-480402592)), when managing both a `develop` and `stable` branches: we cannot make Lerna publish a stable release from a different branch than the main one.
11+
12+
## Decision Drivers <!-- optional -->
13+
14+
- Make Lerna work again for stable releases
15+
- Keep the benefits of the previous workflow:
16+
- Need for automation in releases.
17+
- Be able to merge more quickly whithout breaking the stable branch, while making it possible for beta testers to test the new features.
18+
- Easier delegation to new maintainers.
19+
- Simplified yet structured process for contributors.
20+
- Clearer separation between ongoing development and stable releases.
21+
22+
## Considered Options
23+
24+
- Option 1: Patch Lerna to keep the Simplified Git Flow (as described in the link above)
25+
- Option 2: Switch back to Github Flow, but keeping the automated beta releases
26+
27+
## Decision Outcome
28+
29+
Chosen option: "Option 2: Switch back to Github Flow, but keeping the automated beta releases", because it fullfils all the requirements.
30+
In fact, we can still merge quickly pull requests without releasing a stable release, while keeping the automated beta release.
31+
The stable release is a manual script executed by maintainers.

scripts/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ npm config set registry https://registry.npmjs.org/
1717

1818
cd "${ROOT_PATH}"
1919

20-
if [[ "$(git rev-parse --abbrev-ref HEAD)" != "stable" ]]
20+
if [[ "$(git rev-parse --abbrev-ref HEAD)" != "develop" ]]
2121
then
22-
echo "Please run this command from the stable branch"
22+
echo "Please run this command from the develop branch"
2323
exit 1
2424
fi
2525

0 commit comments

Comments
 (0)