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
Users of Debian-based distributions should prefer the the Deb822 format, installed with:
sudo wget -O /etc/apt/sources.list.d/gitte.sources https://gitte-ppa.cego.dk/gitte.sources
sudo apt-get update
sudo apt-get install gitte
If your distribution does not support this, you can run these commands:
curl -s "https://gitte-ppa.cego.dk/pubkey.gpg" | sudo apt-key add -
echo "deb https://gitte-ppa.cego.dk ./" | sudo tee /etc/apt/sources.list.d/gitte.list
sudo apt-get update
sudo apt-get install gitte
Note that the path /etc/apt/sources.list.d/gitte.list
is used in the file gitte.list
.
If you change it in these commands you must also change it in /etc/apt/sources.list.d/gitte.list
.
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
.
If configured, gitte is able to switch automatically between groups. Switching between groups involve downing all other groups than specified, then upping the specified group.
$ gitte switch <group>
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.
Default: false
Gitte will automatically merge default branch into custom branches if this is set to true.
Default: cwd of the current process
Gitte will use this as the current working directory.
Default: false (false = needs are enabled)
Ignore dependencies.
Default: CPU/2
Set this to limit the number of parallel processes when running tasks.
How to publish debian packages to gitte-ppa.cego.dk
Run ./publish-os-packages
and upload the ppa/ppa.zip file to cego's cloudflare pages
A gpg signing key is needed to sign the debian packages.
Run npm publish
to upload to npmjs.com
You need proper permissions in the @cego
organization on npmjs.com