phing

Phing exec command to set environment variable

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 04:47:12
问题 I'm trying to set an environment variable in a build script with phing. This is normally done command line like this: export MY_VAR=value In Phing I did the following but it isn't working. <exec command="export MY_VAR=value" /> 回答1: Bold claim: There is no way to set/export a (Unix) shell variable in PHP so that it is visible inside the scope that started the php script. php myfile.php (does putenv or shell_exec('export foo=bar');) echo $foo Will return nothing. As PHP can not do it so

travis-ci script

萝らか妹 提交于 2019-12-20 17:35:37
问题 I'm trying to setup phing to work with travis-ci, but I can't get it to run a setup script to get all the dependencies installed. My .travis.yml file is: language: php php: - 5.2 script: ./.travis-phing.sh In travis, I get the error: /home/travis/build.sh: line 105: ./.travis-phing.sh: Permission denied What is causing that? 回答1: Solved The script to be set to execute. I used: chmod a+x .travis-phing.sh Then simply commit, and push back to github. 回答2: Run the script using bash Another option

Phing can't see PHPUnit

别说谁变了你拦得住时间么 提交于 2019-12-20 03:28:08
问题 I'm trying to setup a new Continuous Integration server that utilizes Phing and PHPUnit for automatically running test cases. I've installed Phing with Pear: pear channel-discover pear.phing.info pear install phing/phing I've installed PHPUnit using the new PHAR method: wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar mv phpunit.phar /usr/local/bin/phpunit Then I go to the directory where my build.xml file is located, rung phing and it looks like Phing has no idea where PHPUnit

Setting up a deployment / build / CI cycle for PHP projects

旧巷老猫 提交于 2019-12-16 21:13:14
问题 I am a lone developer most of my time, working on a number of big, mainly PHP-based projects. I want to professionalize and automate how changes to the code base are handled, and create a Continuous Integration process that makes the transition to work in a team possible without having to make fundamental changes. What I am doing right now is, I have a local test environment for every project; I use SVN for each project; changes are tested locally, and then transferred to the on-line version,

build should fail if code coverage Report Percenatge is less

Deadly 提交于 2019-12-12 20:32:26
问题 I have written a build.xml for generating Reports through phing. I have added below command in build.xml to generate code coverage Report :: <exec command="phpunit --coverage-html ./code_Coverage_Report codecoverage_test/CodeCoverage.php "/> Now i wanted to add a check in build.xml that if my code coverage Report percentage is less than 85% then the build should automatically fail. 回答1: This is not possible with PHPUnit. There was a pull request to implement what you want, but it was rejected

cannot get phing to run at all

≡放荡痞女 提交于 2019-12-12 07:26:10
问题 Max OS X 10.7.. when i run phing -v i get the following errors: Warning: require_once(phing/Project.php): failed to open stream: No such file or directory in /usr/lib/php/pear/phing/Phing.php on line 22 Fatal error: require_once(): Failed opening required 'phing/Project.php' (include_path='.:') in /usr/lib/php/pear/phing/Phing.php on line 22 Here are the commands i used: pear config-set auto_discover 1 pear install phing/phing Here is my php.ini: include_path = ".:/Applications/MAMP/bin/php

Phing overrides Symfony2 CLI table output colours

旧时模样 提交于 2019-12-12 02:17:15
问题 I'm trying to print a coloured table after running a Symfony2 CLI command which works fine when running on its own like this: CLI Command: php app/console phing:report inanzzz Output: PROBLEM: When I run same CLI command within Phing, table colour is being overridden as seen below. Anyone knows a solution to it? CLI Command: bin/phing build-report Output: Phing entry for same CLI command: <target name="build-report"> <echo msg="Generating final build report ..." /> <exec logoutput="true"

Phing SSH Agent forwarding

。_饼干妹妹 提交于 2019-12-12 01:09:18
问题 Phing running on Server A, with this SSH task to connect to server B: <ssh username="xxxxxx" host="B" pubkeyfile="/home/xxxx/.ssh/id_rsa.pub" privkeyfile="/home/xxxx/.ssh/id_rsa.pem" command="cd ./public_html/staging; hg pull /> It connects to server B ok, but the hg pull which tries to connect to server C spits back remote: Permission denied (public key) . However manually SSH'ing into server B from A and doing an hg pull works fine, suggesting Agent Forwarding is working as I'm not running

Why is Phing running my build.xml, and then saying it doesn't exist?

陌路散爱 提交于 2019-12-11 17:52:15
问题 It's running my build.xml, when the error pops up that my build.xml is missing... This makes no sense. <project name = "php_project" default = "build" > <!-- ============================================ --> <!-- Target: prepare --> <!-- ============================================ --> <target name = "prepare" > <echo msg = "Making directory ./target" /> <mkdir dir = "./target" /> </target> <!-- ============================================ --> <!-- Target: build --> <!-- ======================

Phing and PHPUnit, just cant get even the most basic thing running

天大地大妈咪最大 提交于 2019-12-11 05:16:07
问题 Using a composer-installed bin I'm running a most basic task as follows: <autoloader autoloaderpath="vendor/autoload.php"> <target name="asdf"> <echo msg="test"/> <phpunit configuration="app/phpunit.xml" haltonerror="true" haltonfailure="true" pharlocation="bin/phpunit" /> </target> Now simply running this task: phing -debug asdf Will result in: +Task: echo -calling setter EchoTask::setMsg() [echo] qwerqwer +Task: phpunit -calling setter PHPUnitTask::setConfiguration() -calling setter