Skip to content

Commit

Permalink
Merge pull request #1960 from oleole39/add_instructions_for_local_aut…
Browse files Browse the repository at this point in the history
…oupdate_check

Add instructions to check locally whether autoupdate strategy is working
  • Loading branch information
alexAubin authored Oct 7, 2024
2 parents 420e325 + ec743f4 commit c58941d
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 c58941d

Please sign in to comment.