Our styles are built on top of IET's SiteFarm styles. When there are upstream changes, follow these steps to bring IET's changes into ours.
git switch main
git pull
./devops/cmds/check-upstream-styles.shThis saves any new campus changes to the dedicated vendor branch (upstream-styles) and prints a report. It is safe to run as often as you like, and it never changes our own code.
If it says Up to date, you're done.
- Campus updates: what campus changed, in their own words.
- Files campus changed: pay extra attention to anything renamed or deleted.
- Files we customised that campus also changed: make sure our edits still make sense.
- Merge preview: which files, if any, will need fixing by hand.
git push origin upstream-stylesThis simply updates the vendor branch in Github.
./devops/cmds/merge-upstream-styles.shIf some files need fixing by hand, the script tells you which ones and how. To back out at any point before finishing, run git merge --abort.
Rebuild everything generated from the styles, such as the compiled CSS and the Lit css.js modules. The local dev container must be running.
./devops/cmds/run-package-tool.sh styles run-allYou can verify what changed with:
git status
git diff --statLook over what changed in services/package/styles/ before committing. This is where problems the merge can't detect show up, such as a renamed class or a new rule that overrides one of ours.
Now, commit and push all changes to the main branch.
-
When we change a campus style file, we wrap our edit in comments so it's easy to spot:
// ucdlib-edit-start: why we changed this ... // ucdlib-edit-end
-
Every campus update is recorded in docs/upstream-styles-log.md.