Updating the core
core:update replaces the core (htdocs/_fegg/core/) with a newer release; site/ is never touched.
Routine updates
./fegg-cli core:status # current version, and whether core files were changed
./fegg-cli core:update --dry-run # show the difference to the latest release (changes nothing)
./fegg-cli core:update # update to the latest tag (vX.Y.Z)
./fegg-cli core:update v5.1.0 # update to a given version
npm run build:scss # the project's CSS, if its SCSS changed (the CMS's comes built)
core:update option | Remarks |
|---|---|
vX.Y.Z | Version to install. The latest tag when omitted |
--dry-run | Show what would change without changing anything |
--force | Overwrite core files that were changed in the project |
core:statusprints the core version and compares the core files withcore/manifest.json.No changes to core files.means the core is untouched and can be updated; otherwise it lists the changed files.- The release is fetched with
git. If you can clone from GitHub over SSH (git clone git@github.com:...works for you), no token is needed. - Only core files are replaced:
htdocs/_fegg/core/,htdocs/_fegg/assets/(the CMS's CSS, JS, images and icons, already built) andhtdocs/_fegg/.htaccess. There is nothing to build after an update.site/(with the sites' templates and assets and the uploads),htdocs/index.php,htdocs/.htaccessandfegg-cliare not changed. - If core files were edited in the project, the command lists them and stops. Move those changes to overrides in
site/(see Directory structure) and run it again. Add--forceonly if you really want to overwrite them. - The replaced files are kept in
htdocs/_fegg/site/data/core-backup/<old version>-<timestamp>/. - After the update, the template cache is cleared and
fegg-cli migrationruns automatically. - Finally, the
core/UPGRADE.mdsections for every version crossed are printed. They list what you have to change by hand (entry files,.htaccess, deprecated APIs). Read them.
Run the tests and check the site, then commit. git status should show only core files.
Changing the source repository
By default the release is fetched from git@github.com:lionheart-group/lh-fegg-skelton.git. To use another repository (a fork, or HTTPS), set it in the project:
<?php
defined('FEGG_CORE_DIR') || exit;
$fegg_update['repository'] = 'https://github.com/lionheart-group/lh-fegg-skelton.git';
The environment variable FEGG_UPDATE_REPO takes precedence over this file.
When the server has no SSH (FTP-only hosting)
- Run
./fegg-cli core:updatein your local working copy, then run the tests and check that everything works. - Commit the changed files.
- Upload
htdocs/_fegg/core/andhtdocs/_fegg/assets/over FTP. Uploadhtdocs/_fegg/.htaccessonly if it changed. fegg-cli migrationcannot run on the server. For versions that change tables, either upload a database file built locally or open/cms/migrate/in the CMS.- Check the live site with
./fegg-cli doctor https://example.com.
Merging upstream with git
You can also update by adding the skeleton repository as upstream and merging a release tag:
git remote add upstream git@github.com:lionheart-group/lh-fegg-skelton.git
git fetch upstream --tags
git merge v5.1.0
If the project only edited site/, there are no conflicts in the core. The skeleton's sample files in site/ (sample controllers and templates) may also have changed; in that case keep the project's version.
Versions
| Version | Meaning |
|---|---|
| Patch (5.0.x) | Fixes inside the core. core:update alone is enough |
| Minor (5.x.0) | New features. Optional work for projects is described in UPGRADE.md |
| Major (x.0.0) | Changes that require fixes to project code |
The full text, including the release procedure for skeleton maintainers, is in docs/updating.md of the skeleton repository.