/lts-driven-git-submodules

This provide specification for using `git submodule` & branching for simplified/naive package system.

MIT LicenseMIT

lts-driven-git-submodules

This provide specification for using git submodule & branching for simplified/naive package system.

You can use your git repository as submodule inside another one. One reason for that is using development approach specified by this document.

Motivation

You have combination of these problems:

  1. internal library
  2. library with minimal/small/no so big need for updating ~ technically done, just support
  3. no (stable) developer team for given library

git submodules give you:

  1. way to provide such library
  2. update library is just git pull
  3. developer using library has ability to create fix/change from inside his/her repository as a new PR request
  4. ↘this have to be tested (as „non LTS” version) in project where the library is used
  5. ↘it can make PR aproving quicker

Specification (version LTS+sub-branches)

To allow library be used as submodule and make library „working”/sustainable you should follow:

  1. There are reserved LTS (long term support) branches
    1. default branch (main/master) = the latest version
    2. branch with prefix lts_: lts_a, …, lts_z, lts_aa, …
  2. The default (main/master) branch contains the latest version of the library code
  3. When change is needed (user):
    1. try existing non-lts branch for your lts branch
    2. or
      1. create new branch with patternt source-unique (source= name of the lts branch, unique= not used identificator to prevent colision)
      2. create Pull Request
    3. automatically non-lts ⇒ hast to be considered when testing parent library/app
    4. commits
  4. Branches lts\_* are created from default branch (automatically after PR is merged, on request, …)
  5. Consolitation of PRs ⇒ new library version update:
    1. Contact coleagues about tests
    2. Additional testing - reimplementation (prefering backward support)
    3. Submit PR + delete branch

Label (version LTS+sub-branches)

For make statement that repo follows these instruction use:

[![LTS+sub-branches](https://img.shields.io/badge/submodule-LTS+sub--branches-informational?style=flat-square&logo=git)](https://github.com/IndigoMultimediaTeam/lts-driven-git-submodules)

in your README.mdLTS+sub-branches