Updating
jddev-update
Update all installed ddev-joomla scripts to the latest versions from the ddev-joomla repository.
Usage
jddev-update [-f] [-h]
Options
| Option | Description |
|---|---|
-f |
Force - Force update: reinstall all scripts regardless of version. Without -f, scripts are only updated when the version in the repository is newer than the local version. |
-h |
Help - Show this help message and exit. |
What it does
- Prompts for confirmation and your password (for writing to
/usr/local/bin/) - Downloads the latest scripts from the repository
mainbranch to a temporary directory - For each script, compares the version in the downloaded file against the installed version
- Only replaces a script if the downloaded version is newer (semantic version comparison) unless the -f option is used
- Reports which scripts were updated, skipped (already up to date), or failed
- Writes a log to
~/.config/ddevjoomla/ddev-joomla-update.log
Alternative: run the updater directly
You can also run the updater script directly without having it installed:
/bin/bash -c "$(curl -fsSL https://code.kreijveld.com/renekreijveld/ddev-joomla/raw/branch/main/updater/ddev-joomla-updater.sh)"
This is useful if jddev-update itself is outdated.
Update log
After each update run, a log is written to:
~/.config/ddevjoomla/ddev-joomla-update.log
Check this file to see which scripts were updated and when.
Update checks
A helper script jddev-checkupdate automatically checks once a day whether updates are available. You never need to call it yourself: every other installed script triggers it in the background near the start of its run, and prints any notice a previous check left behind.
It coordinates all scripts through two files in ~/.config/ddevjoomla/:
| File | Purpose |
|---|---|
.update_check |
Timestamp of the last check. When it is less than 24 hours old, the check exits immediately. The new timestamp is written before any network calls, so several scripts started around the same moment do not all start a check. |
.update_status |
Holds a one-line notice when an installed script is outdated. The next script that runs prints the notice and clears the file. |
Because the check runs in the background, the script that happens to trigger it is usually not the one that shows the notice - it appears on whichever script you run next, once the check has finished.
To see when the last check ran, use jddev-status.
When you see the notice, run:
jddev-update