Skip to content

Commit

Permalink
Add instructions to check locally whether autoupdate strategy is working
Browse files Browse the repository at this point in the history
  • Loading branch information
oleole39 committed Oct 7, 2024
1 parent ea92684 commit ec743f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/utils/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,28 @@ class SourcesResource(AppResource):
And the autoupdater will use the matched group (here: `4.1`) as the version.
You can make sure that your autoupdate strategy is working well immediately (without waiting for the next check on the infra) by doing the following:
1. Clone this repo: https://github.com/YunoHost/apps_tools
2. In `apps_tools` open a terminal to run the following commands:
```sh
# Create test branch
git checkout -b localtest
# Create a Python virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies (if you don't have pip already installed on your system, check https://pip.pypa.io/en/stable/installation)
pip install -r requirements.txt
# Run autoupdate script - replace '/path/to/myapp_ynh' with your actual local app path
./autoupdate_app_sources/autoupdate_app_sources.py '/path/to/myapp_ynh'
```
3. If the return output includes:
- `Apps udpated`, it ran successfully. Note that it will automatically make local changes in your app's `manifest.toml` (which can be discarded as they will be made automatically later online by the YNH infra);
- `Apps failed`, the autoupdate stragegy is not working properly - check the debug info;
- none of the above but `apps -> Autoupdater just ran, here are the results:`, it ran successfully but the app was already up to date.
### Provision/Update
- For elements with `prefetch = true`, will download the asset (for the appropriate architecture) and store them in `/var/cache/yunohost/download/$app/$source_id`, to be later picked up by `ynh_setup_source`. (NB: this only happens during install and upgrade, not restore)
Expand Down

0 comments on commit ec743f4

Please sign in to comment.