elnebuloso / phing-commons
此包已被放弃,不再维护。未建议替代包。
phing commons 构建栈
9.4.0
2016-11-25 20:57 UTC
Requires
- php: ^5.6 || ^7.0
- abraham/twitteroauth: 0.7.1
- apigen/apigen: 4.1.2
- cakephp/cakephp-codesniffer: 2.1.5
- elnebuloso/bundler: ~9.0
- escapestudios/symfony2-coding-standard: 2.9.1
- pdepend/pdepend: 2.3.2
- pear/archive_tar: 1.4.2
- phing/phing: 2.11.0
- phploc/phploc: 3.0.1
- phpmd/phpmd: 2.5.0
- phpunit/phpunit: 4.8.27
- sebastian/phpcpd: 2.0.4
- squizlabs/php_codesniffer: 2.7.0
- dev-master
- 9.4.0
- 9.3.3
- 9.3.2
- 9.3.1
- 9.3.0
- 9.2.0
- 9.1.0
- 9.0.0
- 8.11.0
- 8.10.0
- 8.9.1
- 8.8.2
- 8.8.1
- 8.8.0
- 8.7.0
- 8.6.2
- 8.6.1
- 8.6.0
- 8.5.0
- 8.4.0
- 8.3.2
- 8.3.1
- 8.3.0
- 8.2.0
- 8.1.0
- 8.0.3
- 8.0.2
- 8.0.1
- 8.0.0
- 7.0.2
- 7.0.1
- 7.0.0
- 6.8.2
- 6.8.1
- 6.8.0
- 6.7.0
- 6.6.6
- 6.6.5
- 6.6.4
- 6.6.3
- 6.6.2
- 6.6.1
- 6.6.0
- 6.4.0
- 6.3.0
- 6.2.0
- 6.1.0
- 6.0.2
This package is not auto-updated.
Last update: 2022-02-01 12:22:24 UTC
README
关于
这是一个使用PHING作为构建工具的完整交付构建栈。Phing Commons构建栈为您提供了预定义的目标,您可以通过build.properties文件进行配置。
安装
composer create-project elnebuloso/phing-commons /path/to/your/phing-commons-installation
使用方法
在项目根目录下创建build.xml文件,内容如下。要使用Phing Commons,只需调用/path/to/your/phing-commons-installation/bin/phing
<?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="help"> <!-- ============================================ --> <!-- import phing commons --> <!-- ============================================ --> <import file="${phing.home}/../../../commons/commons.xml" /> </project>
配置
如果您想配置通用目标,请在项目根目录下使用build.properties文件。对于本地添加或本地行为,添加build.properties.local文件。这是一个可选文件。对于全局添加,添加/[home]/phing-commons/build.properties文件。这是一个可选文件。但不要将build.properties.local提交到您的VCS。
build.properties文件是可选的,并在可用时加载。
构建链
每个调用的步骤都会调用之前定义的步骤。如果运行phing init,则init在clean之前调用。如果运行phing build,则build调用完整链。
- build:before
- clean:before
- clean:main
- clean:after
- clean
- init:before
- init:main
- init:after
- init
- test:before
- test:main
- test:after
- test
- bundle:before
- bundle:main
- bundle:after
- bundle
- package:before
- package:main
- package:after
- package
- deploy:before
- deploy:main
- deploy:after
- deploy
- build:main
- build:after
- build
操作链
要操作步骤,您可以在XML中覆盖每个步骤,就像这样。
<target name="test:main" hidden="true" depends="test.phplint, test.phpunit" />
如果您想使用phing-commons预定义的链,可以将此列表添加到属性中:project.chains。使用逗号分隔链
- project.chains = php-composer-package
- project.chains = foo,bar,baz
默认链
在链中,clean:main调用
- clean.tmp:init
- clean.tmp:before
- clean.tmp:main
- clean.tmp:after
- clean.tmp
php-composer-package 链
在链中,init:main调用
- composer.validate:init
- composer.validate:before
- composer.validate:main
- composer.validate:after
- composer.validate
- composer.update:init
- composer.update:before
- composer.update:main
- composer.update:after
- composer.update
在默认链中,test:main调用
- test.phplint:init
- test.phplint:before
- test.phplint:main
- test.phplint:after
- test.phplint
- test.phpunit:init
- test.phpunit:before
- test.phpunit:main
- test.phpunit:after
- test.phpunit