plan
xne plan [--root=DIR] [--channel=stable|beta|main|security] [--to=REF] [--method=auto|filepatch|git]
[--shared=skip|write] [--accept=TRAP,...] [--refresh] [--allow-downgrade]
What an upgrade would do: the source used (gitlab, github, packagist, in that order), the target, the
file diff (add, update, retire, local edits kept aside), the libraries and database steps, the traps and
the ordered steps. Changes nothing in the install.
| Option | Meaning |
|---|---|
--channel | stable (newest stable release of the same major), beta (alpha, beta and rc too), main (the nightly branch: a warning, a forced backup), security (newest stable release of the install's own x.y line) |
--to | a tag (v6.0.15 or 6.0.15), a branch (main) or a 40-hex commit; overrides the channel |
--method | auto (git for git checkouts, else filepatch), filepatch, git; composer is refused until phase 3 |
--shared | files in folders that link out of the install (shared with another clone): skip leaves them, write writes through the link; without it the plan is blocked |
--accept | accepts blocking traps by id, after a person decided so |
--refresh | fetches the source's ref list again (it is cached for index_ttl seconds) |
--allow-downgrade | allows a target older than the install (use xne rollback instead when you can) |
The plan lists: the sources in rank order and which answered; the target (ref, kind, commit, version, source); the method and the base of the file diff (release v6.0.14: the tree of the install's own release, else share/filelist.md5, else none); the file counts; the local edits; the database mode (kernel: the stages exp:upgrade will run; sql: the SQL update files, in order); whether Composer runs; the traps; warnings; the ordered steps; and blocked (why it would be refused). A plan downloads the target release (and the install's own release, as the base) into the release cache once; it changes nothing in the install. Exit 3 when the plan is blocked.
upgrade
xne upgrade [plan options] [--dry-run]
Plan, verified backup, maintenance (setting), files, the kernel's exp:upgrade or the SQL update files,
autoloads and cache clears, health check. Any failure after the backup rolls back files and database
at once. --dry-run prints the plan and changes nothing.
With --dry-run it prints the plan and stops (exit 0, or 3 when blocked). Otherwise, in this order:
- plan again, refused (exit 3) when blocked;
- lock of the install (
<state_dir>/installs/<install>/lock): a second run is refused; - backup, verified (rollback-guide.md); when it fails, nothing is changed;
- maintenance on when
maintenance=page(the kernel'sbin/php/maintenance.php on --allow-admin); - files: the file patch (add, update, local edits replaced after a copy is kept, retired files moved aside) or the git fast-forward (
git merge --ff-only); - libraries, database, scripts:
php bin/php/upgrade.php --apply --stages=[libraries,]database,scripts --no-deploy --no-verify --no-tests --format=json --no-caption --force-no-caption --to=<commit>when the target has the kernel's exp:upgrade (xne's backup replaces the kernel's caption), else the SQL update files; - finish:
ezpgenerateautoloads.php -e, thenezcache.php --clear-tag=<tag>once per tag ofcache_tags; withfinish=velocityalsoexp:velocity deploy; - health: written files equal the release,
share/filelist.md5is the release's own and matches the files, the install starts from the CLI (ezcache.php --list-tags),exp:upgrade:statusshows no failed or pending step of the stages that ran, everyhealth_urlanswers 200 to 399; - maintenance off; the backup is marked
applied; older backups beyondbackup_keepare rotated away.
Any failure in steps 4 to 8 starts the automatic rollback and the command exits 1 with rolled_back: true.
sources
xne sources [--refresh]
The release sources in rank order, which one answers, and the newest refs per channel.
The sources in rank order (sources=, default gitlab,github,packagist; local for a folder of release archives), which one answered, and the target of each channel. Ref lists are cached for index_ttl seconds; --refresh fetches them again.