Tool to help keep a range of projects up to date with git version control, and also help execute commands and scripts across projects. For configuration options please refer to config documentation.
Requires npm and node version 16 or higher.
npm install -g @cego/gitte
curl -s "https://cego.github.io/gitte/ppa/pubkey.gpg" | sudo apt-key add -
sudo curl -s -o /etc/apt/sources.list.d/gitte.list "https://cego.github.io/gitte/ppa/gitte.list"
sudo apt-get update
sudo apt-get install gitte
In a terminal in a folder with a gitte configuration, or a subfolder thereof, run:
$ gitte run <actions> <groups> [projects]`
Gitte will then do the following
- Run all specified startup checks. If any fail, exit.
- Try to update all projects with git pull. Will inform the user if update is not possible. Gitte should never overwrite local changes.
- Execute the desired action with the given group. The optional project parameter can be used to limit the projects the action and group will run in.
An optional option
--auto-merge
can be supplied, that will automatically merge origin/<default_branch> into each project, if you are on a non-default branch without local changes or conflicts. This can also be set by the env variableGITTE_AUTO_MERGE=true
.
All three parameters support the wildcard '*' which will run all action, groups or projects. For example one might want to run all actions in all groups, which can be accomplished with
gitte run '*' '*'
If you want to specify multiple actions, groups or project, please use the +
operator.
gitte run build+deploy example.com
It is possible to disable projects completely. This can be done using the toggle
command.
To see a current list of enabled/disabled projects:
gitte toggle
To toggle a project:
gitte toggle <project>
To reset to default state:
gitte toggle reset
For other usage, such as running startup, git operations or actions seperately, please refer to commands documentation, or see gitte --help
.
If the file .gitte-override.yml
exist in the same folder as .gitte.yml
or .gitte-env
it will automatically be merged.
If the file .gitte-projects-disable
exist, projects, seperated by a newline, will be excluded from gitte.