Git Autofetch
Git Autofetch is a simple software for fetching new changes from a repo to local repositories after a set time interval.
This program is responsible for checking the remote repo for changes and updating the local copy of the repo after a set delay (can be set in configs file later)
INSTALLATION
-
Run the install.py. This is important to create important files, and create paths dynamically.
run
python3 install.py
This will create 3 files which are :
S. No File Name Purpose 1 configs.py
Basic Configuration (Delay) 2 projectlist.py
To store the list of projects to update (local folder path) 3 autofetch.service
Service file to tell systemd to run our program in background -
Register Projects in the newly created projectlist.py
For registering projects, you are required to add a _Project object1 in the PROJECT_LIST2, which will be available in projectlist.py file. You can give
name
,url
and localpath
of the project as parameters to object.1. To create objects the syntax is as follows :
_Project( path=/path/to/git/project/folder ),
2. Do remember to add a comma after previous _Project object, or else it will give errors. [see below image
line:7
] -
Move the newly created autofetcher.service to systemd's folders.
-
Reload the systemd daemon.
-
Start the service autofetcher.service
run
sudo systemctl start autofetcher
-
Check the status of autofetcher service
-
(optional) Enable the service autofetcher
run
sudo systemctl enable autofetcher
And you will have your autofetcher running.
ISSUES
In case of issues, please open an issue. Describe the following :
- Which OS are you trying this on ? (Windows\Mac\Linux)
- Steps you followed
- Run step 8, attach screenshot of errors