Skip to content

Commit cc7e57d

Browse files
committed
chore: adopt git-flow with a develop branch
Every change has been landing straight on main, which is also the branch that publishes the site and tells TechEngine to pick up new data — so any merge was effectively a release. Adds develop as the integration branch and keeps main for released state. - validate-data now also runs on pushes to develop, so integration is checked the same way main is - bump-engine lands the submodule bump on develop instead of pushing to main. It switches branch *before* updating the submodule, so the change is staged on the branch that will carry it rather than being committed and then orphaned - README documents the model and points contributors at develop deploy-pages and notify-engine deliberately stay on main: publishing and the engine handshake should happen on release, not on every integration merge.
1 parent 30ea2b5 commit cc7e57d

3 files changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/bump-engine.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
- name: Update TechEngine submodule to latest main
3333
id: bump
3434
run: |
35+
# git-flow: the bump is integration work, so it lands on develop.
36+
# main only moves through a release PR. Switch branch BEFORE touching
37+
# the submodule so the change is staged on the branch it will be
38+
# committed to.
39+
git fetch origin develop
40+
git checkout -B develop origin/develop
41+
git submodule update --init --recursive TechEngine
3542
git submodule update --remote --recursive TechEngine
3643
if git diff --quiet -- TechEngine; then
3744
echo "changed=false" >> "$GITHUB_OUTPUT"
@@ -51,8 +58,8 @@ jobs:
5158
git config user.email "289859915+TechEngineBot@users.noreply.github.com"
5259
git add TechEngine
5360
git commit -m "chore: bump TechEngine submodule to ${NEW_SHA}"
54-
git pull --rebase origin main
55-
git push origin HEAD:main
61+
git pull --rebase origin develop
62+
git push origin HEAD:develop
5663
echo "techapi_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
5764
5865
- name: Dispatch reciprocal TechAPI bump to TechEngine

.github/workflows/validate-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- "data/**"
99
- "app/validate.py"
1010
push:
11-
branches: [main]
11+
branches: [main, develop]
1212
paths:
1313
- "data/**"
1414
- "app/validate.py"

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,26 @@ python -m app.validate
4646

4747
The validator uses only the Python standard library; no install step required.
4848

49+
## Branching
50+
51+
This repo follows git-flow:
52+
53+
| Branch | Role |
54+
| --- | --- |
55+
| `main` | Released state. Publishing the site and notifying TechEngine both fire on a push here, so it only moves through a release PR. |
56+
| `develop` | Integration. Every data, feature and fix branch targets this. |
57+
| `feat/*`, `data/*`, `fix/*`, `chore/*` | Short-lived work branches, cut from `develop`. |
58+
59+
A release is a PR from `develop` to `main`; merging it deploys the site and tells
60+
TechEngine to pick up the new data. Automation follows the same rule — the
61+
submodule bump and the verified-promotion bot both land on `develop`.
62+
4963
## Contributing
5064

51-
Open a PR with the new/updated JSON file. The PR template walks through what to
52-
include. The validator must pass. All records (`brand`, `soc`, `smartphone`,
53-
`gpu`, and `cpu`) must include `source_urls` with at least one canonical
54-
reference (vendor product page, Wikipedia infobox, datasheet).
65+
Open a PR **against `develop`** with the new/updated JSON file. The PR template
66+
walks through what to include. The validator must pass. All records (`brand`,
67+
`soc`, `smartphone`, `gpu`, and `cpu`) must include `source_urls` with at least
68+
one canonical reference (vendor product page, Wikipedia infobox, datasheet).
5569

5670
## License
5771

0 commit comments

Comments
 (0)