A folder of components and configuration that is shared between RSV website repos via git submodules.
Warning
Submodules are tricky!
Put the rsv-shared
repo and all website repos in a local rsv-landingages
folder.
The scripts will rely on this structure.
/Development/rsv-landingages/rsv-shared
– Repo with shared code that we access via git submodules/Development/rsv-landingages/rsv-rs8
- the/shared
folder hold the code of thersv-shared
repo as a git submodule/Development/rsv-landingages/rsv-frm7
- dito
- Submodules are only updated when pulled (from inside the website repo).
- The commit that the Submodule represents is checked in via a commit in the website repo.
- In order to update a Submodule, you need to pull it and also commit this pull in the website repo.
- We never work on the rsv-shared repo directly.
- Instead we work on the website repo, then check in changes to the submodule from within that repo.
- Afterwards we have to sync those changes to the other repos.
Before we start the dev server, we ensure that our submodule is clean (everything is comitted) and fetch the latest submodule code.
See pre-dev.ts
, triggered by npm run predev
Before we push the website project, we ensure that our submodule is clean (everythign is committed) and pushed.
See pre-push.ts
, triggered by Husky's pre-push
After we changed something, we should update all other projects.
(TODO) We have a helper scripts that will traverse the rsv-landingages
folders.
git submodule add https://github.com/FixMyBerlin/rsv-shared.git shared