exp:expmigrationreposplit
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Split the migrations folder of the installation's git checkout into a repository of its own with its history (every commit that changed it, same authors, dates and messages); a dry run unless --apply
Usage
./console exp:expmigrationreposplit [options] php bin/php/expmigrationreposplit.php [options] ./console exp:migration:repo:split [options]
Aliases
exp:migration:repo:split
Help
The output of ./console help exp:expmigrationreposplit (the script run with --help), without the standard options:
Usage: bin/php/expmigrationreposplit.php [OPTION]... Split the migrations folder into a repository of its own, with its history Every commit of the installation's checkout that changed the folder becomes a commit of the folder alone (same author, committer, dates and message), on the branch --branch of the checkout (default migrations-split; a branch that exists is never moved). With --to a new repository is made in that new or empty folder with the history as its branch main and, with --remote, the remote origin; it is never pushed. Neither the settings nor the files of the site are changed: the report says what to set in migration.ini ([RepositorySettings] Mode=separate, Path) and how to take the folder out of the site's checkout. Needs only git (no git subtree). Without --apply it says what it would do. ./console exp:migration:repo:split ./console exp:migration:repo:split --to=../site-migrations --apply ./console exp:migration:repo:split --to=../site-migrations [email protected]:example/site-migrations.git --apply Options: --apply Make the changes (the default is a dry run that lists them and changes nothing) --dry-run The default, accepted for scripts that pass it: list what would change, change nothing --format=VALUE text (default) or json (the machine output exp-migration/1) --directory=VALUE The migrations folder to split (default the first [MigrationSettings] DirectoryList entry) --branch=VALUE The branch of the checkout the split history goes to (default migrations-split; never an existing one) --to=VALUE A new or empty folder for the new repository (its branch main); without it only the branch is made --remote=VALUE The remote origin of the new repository (a URL or path; it is not pushed)
Options
| Option | Value | Description |
|---|---|---|
| --apply | - | Make the changes (the default is a dry run that lists them and changes nothing) |
| --dry-run | - | The default, accepted for scripts that pass it: list what would change, change nothing |
| --format | required | text (default) or json (the machine output exp-migration/1) |
| --directory | required | The migrations folder to split (default the first [MigrationSettings] DirectoryList entry) |
| --branch | required | The branch of the checkout the split history goes to (default migrations-split; never an existing one) |
| --to | required | A new or empty folder for the new repository (its branch main); without it only the branch is made |
| --remote | required | The remote origin of the new repository (a URL or path; it is not pushed) |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/expmigrationreposplit.php, kernel/private/classes/commands/expmigrationreposplit.php
See also
Generated example: exp:expmigrationreposplit
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment