rorteg / mage-ci

Magento 持续集成工具

维护者

详细信息

github.com/rorteg/MageCI

主页

源代码

安装: 394

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 33

语言:Shell

1.0.10 2014-10-28 08:03 UTC

This package is auto-updated.

Last update: 2024-09-07 17:47:52 UTC


README

一套工具,帮助设置测试 Magento 的合适环境

安装

通过 composer.json 进行安装非常简单

在您的应用程序或依赖库的根目录中,创建一个 composer.json 文件。如果您不熟悉 Composer,请参阅 composer.json Schema

requirerequire-dev 部分,添加以下依赖项

"ecomdev/mage-ci": "dev-master"

使用方法

运行一批 PHPUnit 测试

$ mage-ci phpunit <directory> <OPTIONS> 
    Runs unit tests for all phpunit.xml or phpunit.dist.xml files in <directory> or its subdirectories. 
    <OPTIONS> will be passed directly to phpunit binary.

安装特定版本的 Magento

$ bin/mage-ci install <magento_directory> <version> <db_name> <OPTIONS>
    Installs a Magento version to a specified destination
      -c                  Create databases flag
      -t                  Create test database flag (only in combination with -c option)
      -u  <db_user>       DB Username
      -p  <db_pass>       DB Password
      -r  <sql_base_url>  SQL dumps repository url for a particular Magento version (<sql_base_url>/<version>.sql.gz)
      -f  <sql_dump_file> SQL dump file, if you'd like to preinstall some data and specfied -c option

安装 Magento 模块

$ bin/mage-ci install-module <magento_directory> <module_dir_or_vcs_url>
    Installs a Magento module with modman definition 

更新已安装的 Magento 模块

$ bin/mage-ci update-modules <magento_directory>
    Updates all installed modman modules at specified Magento instnace 

卸载 Magento 版本

$ bin/mage-ci uninstall <magento_directory> [<db_name>] <OPTIONS>
    Performs uninstall of Magento instance
      -u  <db_user>       DB Username
      -p  <db_pass>       DB Password

卸载 Magento 模块

$ bin/mage-ci uninstall-module <magento_directory> <module_dir_or_vcs_url>
    Performs uninstall of Magento module from instance

批量安装 Magento 版本

$ bin/mage-ci install-multiple <directory> <prefix> <version1> ... <versionN> <OPTIONS>
    Installs multiple version of magento at <directory> in subdirectories which name is a combined value of <prefix>-<version> 
       -d  <download_dir>  Directory where all downloads are stored
       -u  <db_user>       DB Username
       -p  <db_pass>       DB Password
       -t                  Create test db as well
       -r  <sql_base_url>  SQL dumps repository url for a particular Magento version (<sql_base_url>/<version>.sql.gz)

导出现有已安装版本的数据库

$ bin/mage-ci db-dump <directory> <prefix> <version1> ... <versionN> <OPTIONS>
    Creates Magento database dump file at <directory> directory with name <file_prefix><version>.sql.gz, the dumped database is <prefix>_<version>
       -u  <db_user>       DB Username
       -p  <db_pass>       DB Password
       -s  <file_prefix>   sql file prefix

Magento 清理数据库导出

可以为特定版本的 Magento 指定数据库导出的基本 URL。通常,干净安装 Magento 需要很长时间,因此为每个 Magento 版本准备干净的数据库导出会很好。

我们在以下 URL 创建了这样的存储库: http://mage-ci.ecomdev.org

您只需要在安装过程中指定它

$ bin/mage-ci install magento-1.7.0.2 1.7.0.2 mage_1.7.0.2 -r http://mage-ci.ecomdev.org 

此命令将从以下 URL 下载数据库导出:http://mage-ci.ecomdev.org/1.7.0.2.sql.gz