Create a script to keep the sourcecode up-to-date
The update.py script will push changes to a git repo when changes are found. See the README for more details.
This commit is contained in:
@@ -8,3 +8,23 @@ Given the main JS file URL, the source code can be downloaded and mapped using:
|
||||
```
|
||||
|
||||
For convenience you can run `python update.py`
|
||||
|
||||
## Syncing with git repo
|
||||
|
||||
The script is designed to keep the contents of a git repo up-to-date with the
|
||||
current files. This can be paired with a cronjob to keep an up-to-date version
|
||||
of the code someplace.
|
||||
|
||||
To ensure the `push` phase of the update works as expected, it is recommended
|
||||
to provide an SSH URL for the repository, as we can leverage an SSH key for a
|
||||
password-less authentication.
|
||||
|
||||
The following example would keep the latest code extracted from dndbeyond.com
|
||||
stored in the `ddb_src` directory on the `master` branch of the given git repo.
|
||||
If changes are found they are automatically pushed to the repository,
|
||||
```
|
||||
python update.py \
|
||||
--directory "ddb_src" \
|
||||
--git-repo "ssh://git@git.example.com/test/dndbeyond_src.git"
|
||||
--git-branch "master"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user