The following tasks are part of the development tools, to simplify the local development and release process.
Sync local application with the remote instance.
$ dep dev:sync localReset local branch for further development.
$ dep dev:tr local [--no-db-sync] [--cache-db]Use cache-db to cache the database for 1 day after syncing it. Useful for large databases and to reduce load in the source system.
Dump the database of the sync source (see dev_db_sync_tool_default_sync) to an sql file. This task is used by dev:tr with --cache-db option set to create a once-per-day sql dump. The dump is kept in dev_tr_db_dump_dir as <date>.sql with the legacy db-sync-tool and as <date>.sql.gz with php-sync-tool, which compresses it.
php-sync-tool also leaves its copy of the dump in the dump directory of the source (default /tmp/) and only removes old dumps with its own file name prefix. Clean up the directory there or point dump_dir in the sync configuration to a directory that is cleaned regularly.
$ dep dev:dump localImport the local database by an sql dump. This task is used by dev:tr with --cache-db option import the once-per-day sql dump.
$ dep dev:import localThis task combines multiple steps to automate the release preparation.
Start the new release task.
$ dep dev:release localDefine the new release number within the prompt or use --new-version=1.2.3.
This includes the following steps:
- Tabula Rasa (reset local state)
- Start new release
- Custom steps
- Composer updates (App & CI)
- NPM updates
- QS (PHP & NPM)
- Tests (Acceptance)
You can extend or overwrite or disabled these steps, e.g.
task('dev:release:test:acceptance')->addAfter(function() {
runLocally('echo hello world')
});
task('dev:release:qa:npm')->disable();Use the following command to reset the new release branch (in case of an occurring error):
$ dep dev:release:reset localUse the following command to finish the new release branch by checking out the default branch and creating the new release version:
$ dep dev:release:finish localAlways check the automated created git commits before pushing them.
The automated commits contain only the files of their step (composer.json and composer.lock, or package.json and package-lock.json or npm-shrinkwrap.json). Other modified, staged or untracked files stay out of them, and a lock file the project does not track is skipped.
See the default config set.php to adjust the release process to your needs.
Hint: Use the following command to link your git user into the ddev container.
ln -s ~/.gitconfig ~/.ddev/homeadditions/.gitconfig