Update git working directory and run commands
Project description
Run command when the upstream git branch was updated.
Example work file named git-monitor.yaml:
path: ~/work/company-website-devcommand: ansible-playbook playbook-develop-company.yml path: ~/work/company-website-prodremote: originbranch: productionforce: 1commands:- ansible-playbook playbook-deploy-company.yml
The first item ignores the default values, which are remote=origin, branch=main, force=0. If you didn’t set command, gitmon will only update the repository.
In the next example we have three additional fields:
path: ~/work/company-website-prodremote: originbranch: mainforce: 1repo_url: git@github.com:username/company-websitessh_keyfile: ~/.ssh/company-keyssh_keyfile_password: company-password
If the path is empty, we will try to create a new clone. And if the url scheme is not http, we will assume it was ssh, and if ssh_keyfile is set we will use that when cloning or updating the path.
Usage
Example:
python3 -m gitmon git-monitor.yaml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygitmon-0.0.2.tar.gz
(41.3 kB
view hashes)
Built Distribution
pygitmon-0.0.2-py3-none-any.whl
(29.3 kB
view hashes)