Maintain a fork of safe-settings that allows both ease of testing, and streamlined contributions upstream.
The fork branches and tags should always mirror upstream for ease of development.
The fork should hide its customizations in a side branch so we do not need to constantly rebase our feature branches, or accidentally contribute these customizations upstream.
We retain a balena/main
branch with customizations as the default branch of the fork.
A scheduled workflow in this branch includes a sync fork job to force sync all upstream branches and tags with origin. Branches that exist in the fork but do not exist upstream are ignored. Local changes to branches that exist upstream are removed!
See: https://github.com/repo-sync/github-sync
Occasionally we should manually rebase balena/main
with upstream main-enterprise
to ensure we have the latest changes.
git fetch
git checkout balena/main
git rebase origin/main-enterprise
This is not critical as development branches should be based on main-enterprise
and not balena/main
.
-
Create a
balena/feature-x
orbalena/fix-x
branch or similar based onmain-enterprise
for testing changes. Do not open a pull request at this time, just work on the branch. -
When ready, use the
Create pre-release
workflow dispatch job to generate a tagged release and image.Use workflow from:
balena/feature-x
Bump:
patch
Prerelease:
withBuildNumber
Prelabel:
snapshot
-
Once changes are tested, a PR can be opened against the upstream
main-enterprise
branch. Do not open a PR with the basebalena/main
as it will not be merged.