gggeek / ezextensionbuilder
提供构建(包)eZ Publish(仅限4.x或Legacy Stack扩展)扩展的工具
Requires
- php: >=5.3
- ezsystems/ezcs: @dev
- indeyets/pake: >=1.99.2
- phploc/phploc: 2.*
- phpmd/phpmd: 1.*
- phpunit/phpunit: 3.7.*
- sebastian/phpcpd: 1.*
- sebastian/phpdcd: 1.0.*@dev
- squizlabs/php_codesniffer: 1.*
- zetacomponents/archive: @dev
- zetacomponents/document: @dev
This package is auto-updated.
Last update: 2024-09-11 19:46:28 UTC
README
什么是eZ扩展构建器?
一组php文件和工具,用于“构建”eZ Publish扩展和交付品(仅限eZP 4.x或Legacy Stack扩展)。它基于Pake工具。
构建过程目前包括以下步骤
- 从svn/git仓库获取源代码的最新版本副本
- 执行一系列合规性检查(例如,许可信息文件必须存在)
- 在特定文件中替换一些占位符字符串(例如,版本号和许可信息)
- 从文档源生成最终用户文档(例如,从rst文件生成.html文件)
- 创建扩展的tar包
这些步骤通过“pake任务”实现。还有许多其他任务可用,这使得它既是一个质量保证工具,也是一个构建工具。
许可
本软件根据GNU通用公共许可证v2.0许可。完整的许可协议包含在LICENSE文件中。有关更多信息或疑问,请联系info@ez.no
要求
- php cli
- 命令行工具:svn和/或git,doxygen,tar,zip
- Pake版本1.7.4或更高。您可以从https://github.com/indeyets/pake获取它,或者通过composer安装作为扩展本身的一部分
- 其他php工具和库:所有依赖项都通过composer自动管理
安装和运行
阅读INSTALL文件以开始并获取使用说明
目录结构
让我们称ROOT_DIR为您将运行构建脚本的目录。这个目录通常是您扩展的顶级目录,但实际上它可以在任何其他地方:
ROOT_DIR/
|___pake the directory where the configuration file used for the build is expected to be
| |
| `___options-myext.yaml the configuration file
|
|___build/myext a copy of the extension myext will be downloaded here during the build
| NB: if you plan to produce an ezpackage out of the extension,
| this directory will change to build/ezextension/<myextension>
|
|___dist/ tarballs produced by the build will be made available here
|
`___vendor/gggeek/ezextensionbuilder
|
|___classes/ php classes with the bulk of the business logic for this tool
|___doc/ more documentation, such as changelogs, todos and known bugs
|___INSTALL installation instructions
|___LICENSE license file
|___README this file
|___composer.json configuration file for composer
|___doxyfile_master configuration file used when the generate-documentation task is set to create api docs via doxygen
|___ezextbuilder a shell-script wrapping execution of pakefile.php
|___options-ezextensionbuilder.yaml configuration file used to build this extension itself
|___options-sample.yaml a sample configuration file
|___package_master.xml template file used by the generate-sample-package-file task
|___pakefile.php the main build script
`___pakefile_bootstrap.php a php file used by the build script
如您所见,我们尽量不污染ROOT_DIR:所有东西都整齐地存放在vendor、pake、build和dist子目录中。
常见问题解答
-
可以使用与pakefile捆绑的pake独立副本吗?是的:只需使用不同的命令行即可。
pake -f ./vendor/gggeek/ezextensionbuilder/pakefile.php build myext
-
可以在同一个ROOT_DIR中构建多个扩展吗?是的。只需为每个创建一个选项文件。
-
脚本可以使用我以前ant-based版本使用的古老配置文件吗?是的。使用convert-configuration任务将它们转换为新的格式。
-
我可以通过下载完整的zip而不是通过composer安装工具吗?可能可以。但您必须自行测试是否所有include_path和自动加载功能都正常工作。
-
与git/svn的交互:在哪个仓库中提交哪些文件,哪些不提交?如果您计划在扩展的根目录中构建,您可以非常容易地向版本化的源代码中添加单个文件:./pake/options-myextension.yaml。您应该配置git / svn忽略./vendor、./build/和./dist/目录。
-
帮助。在构建扩展后,我的eZ Publish不再工作了!这是一个非常罕见的情况。这可能会发生在您在实时eZ Publish安装中构建扩展时,或者您在构建后没有清理构建目录,并且重新生成eZ Publish自动加载配置(例如,通过激活或停用扩展)。发生的情况是自动加载配置指向构建目录中的文件中的PHP类,而不是扩展本身的文件。修复方法:只需清理构建目录并重新生成自动加载配置即可。