basics.rst 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Development Basics
  2. ==================
  3. Gluon's source is kept in `git repositories`_ at GitHub.
  4. .. _git repositories: https://github.com/freifunk-gluon
  5. Bug Tracker
  6. -----------
  7. The `main repo`_ does have issues enabled.
  8. .. _main repo: https://github.com/freifunk-gluon/gluon
  9. IRC
  10. ---
  11. Gluon's developers frequent `#gluon on hackint`_. You're welcome to join us!
  12. .. _#gluon on hackint: irc://irc.hackint.org/#gluon
  13. Working with repositories
  14. -------------------------
  15. To update the repositories used by Gluon, just adjust the commit IDs in `modules` and
  16. rerun
  17. ::
  18. make update
  19. `make update` also applies the patches that can be found in the directories found in
  20. `patches`; the resulting branch will be called `patched`, while the commit specified in `modules`
  21. can be refered to by the branch `base`.
  22. After new patches have been commited on top of the `patched` branch (or existing commits
  23. since the base commit have been edited or removed), the patch directories can be regenerated
  24. using
  25. ::
  26. make update-patches
  27. If applying a patch fails because you have changed the base commit, the repository will be reset to the old `patched` branch
  28. and you can try rebasing it onto the new `base` branch yourself and after that call `make update-patches` to fix the problem.
  29. Always call `make update-patches` after making changes to a module repository as `make update` will overwrite your
  30. commits, making `git reflog` the only way to recover them!
  31. Development Guidelines
  32. ----------------------
  33. lua should be used instead of sh whenever sensible. The following criteria
  34. should be considered:
  35. - Is the script doing more than just executing external commands? if so, use lua
  36. - Is the script parsing/editing json-data? If so, use lua for speed
  37. - When using sh, use jsonfilter instead of json_* functions for speed
  38. Code formatting may sound like a topic for the pedantic, however it helps if
  39. the code in the project is formatted in the same way. The following rules
  40. apply:
  41. - use tabs instead of spaces
  42. - trailing whitespaces must be eliminated