Class MigrateCustomCommand
Update/migrate custom code from the "custom" folder using Git.
Notes: (1) This command requires a Unix-like shell environment with rsync and git installed in it in order to run properly. (2) The Git repository must be up-to-date and have tags corresponding to the versions updating to and from. (3) This script will not work properly if the git repository is a clone of the public repository found on Github, and if using Professional Edition. Otherwise, if using Open Source Edition, this script should work with a clone of that repository (assuming the clone has all version tags). (4) Since controller classes only extend their base-code analogues, and do not fully copy/replace them, they are ignored by this whole process. Updating them should just be a matter of updating only the methods that were overridden, if any, instead of the entire file.
- CComponent
- CConsoleCommand
- X2ConsoleCommand
- MigrateCustomCommand
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/commands/MigrateCustomCommand.php
public
|
#
actionUpdate( string $origin, string $target, string $source = null, string $gitdir = null, string $branch = null, mixed $nocopy = 0 )
Updates the custom code. |
public
|
#
actionCopy( string $origin = null, mixed $target = null, mixed $source = null, mixed $gitdir = null, mixed $branch = null )
Copies the current source files onto analogues found in the git directory. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
type
|
|
public
string
|
|
public
type
|
|
public
array
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
|
|
public
|
#
restoreParams( type $params = array() )
Uses parameters saved to the persistence file during the current operation |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
formatter(),
headerMsg()
|
__construct(),
afterAction(),
beforeAction(),
behaviors(),
buildFileList(),
confirm(),
copyFiles(),
ensureDirectory(),
getCommandRunner(),
getHelp(),
getName(),
getOptionHelp(),
init(),
onAfterAction(),
onBeforeAction(),
pluralize(),
prompt(),
renderFile(),
resolveRequest(),
run(),
usageError()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
integer |
DEBUG
|
0 |
|
string |
PERSIST_FILE
|
'.x2_git_migrate.json' |
public
string
|
$origin |
|
#
The version from which the custom code is being updated. |
public
string
|
$target |
|
#
The version to which the custom code should be updated. |
$defaultAction
|
public
string
|
$branch |
#
The name of the temporary branch that will be used for merging and updating custom code. |
public
array
|
$fileList |
#
List of custom files to be copied. |
public
string
|
$gitdir |
#
The directory of the git repository. If unspecified, it is assumed to be one level above the web root. |
public
string
|
$rsync |
#
Default rsync command to use for synchronizing files. |
public
string
|
$source |
#
The path to the custom folder. If unspecified, it is assumed that it is the custom folder inside the current installation. |
$commandRunner,
$help,
$name,
$optionHelp
|