phing

How to use existing phpunit.xml in phing build.xml?

穿精又带淫゛_ 提交于 2019-12-07 08:34:26
问题 I have an existing phpunit.xml (configuration file for phpunit), which looks like this: <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="./tests/bootstrap.php" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" strict="true" verbose="true" colors="true"> <testsuites> <testsuite name="My Tests"> <directory>./tests</directory> </testsuite> </testsuites> </phpunit> As DRY says, I don't want to simply copy & paste content

Restarting apache with Jenkins or Phing

只谈情不闲聊 提交于 2019-12-07 04:02:48
问题 I'm currently using Phing and Jenkins to automate builds and deployment for my CodeIgniter app. One problem I'm having trouble with is restarting the apache service. I tried in Phing but there isn't enough permissions. What is the best way to restart? EDIT: After adding jenkins into the sudoer file and exec'ing the service httpd restart, Jenkins throws: Process leaked file descriptors. Below is a snippet of the Phing output via Jenkins. It says a workaround is to install daemonize. Not sure

How to beautify the output of phing?

谁都会走 提交于 2019-12-06 16:31:40
Phing , by default, or even with any of built-in loggers (phing.listener.NoBannerLogger, phing.listener.AnsiColorLogger, phing.listener.XmlLogger and phing.listener.HtmlColorLogger) has quite verbose output. My use-case is to use Phing for running tests as a pre-commit hook. Therefore I don't care about all that information in log phing may provide me. I just use it as a multiplatform tool for running tests. Example: Buildfile: /private/var/workspace/www/me_com/build.xml SBKSWWW > main: [delete] Deleting /private/var/workspace/www/me_com/temp/pre-commit-hook/changed_files [delete] Deleting

How do I get PEAR.php with Composer?

那年仲夏 提交于 2019-12-06 12:21:50
问题 I installed pear/archive_tar to work with Phing, which I installed with Composer. However, I received this error: BUILD FAILED exception 'BuildException' with message 'Error reading project file [wrapped: You must have installed the PEAR Archive_Tar class in order to use TarTask.]' in vendor/phing/phing/classes/phing/parser/ProjectConfigurator.php:197 I added the PEAR repository to Composer and updated, but it still did not work. The second half of this question branched off here. 回答1: I set

How to preserve application.ini paths using Zend_Config_Writer_Ini

徘徊边缘 提交于 2019-12-06 08:07:20
问题 I'm currently working on a build system in Phing that takes a Zend Framework project template and configures it according to Phing parameters. One problem that I've come across is when using Zend_Config_Writer_Ini. My Phing task takes a pre-populated file from the repo called application.default.ini and modifies this using Zend_Config_Ini to add parameters from the build file (db details, etc). It then writes it to application.ini ready for the project to use. A simplified version of the

Restarting apache with Jenkins or Phing

怎甘沉沦 提交于 2019-12-05 12:16:39
I'm currently using Phing and Jenkins to automate builds and deployment for my CodeIgniter app. One problem I'm having trouble with is restarting the apache service. I tried in Phing but there isn't enough permissions. What is the best way to restart? EDIT: After adding jenkins into the sudoer file and exec'ing the service httpd restart, Jenkins throws: Process leaked file descriptors. Below is a snippet of the Phing output via Jenkins. It says a workaround is to install daemonize. Not sure what that means... ...Build_test > compress: [echo] YUI Compression started [echo] Replacing normal JS

build.xml to set date and time as file name

梦想与她 提交于 2019-12-05 07:57:38
I want to set file name with date and time attached to it so I want to create file named as behat-20140913-195915.html however the example below sets the name as behat-yyyymmdd-hhiiss.html . Anyone know the solution to problem? I followed this example Note : These two don't work too: ${DSTAMP} ${TSTAMP} <?xml version="1.0" encoding="UTF-8"?> <project name="Sport" default="build-default" basedir="."> <tstamp> <format property="TODAY_MY" pattern="yyyymmdd-hhiiss" locale="en,UK" /> </tstamp> <target name="build" description="Runs everything in order ..." depends="behat-bdd" /> <target name="behat

Phing exec command to set environment variable

徘徊边缘 提交于 2019-12-05 05:22:39
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" /> 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 neither can phing. Accessing shell environment variables accross multiple script runs (if its that what you want)

Why Phing/Ant over Bash and Make? [closed]

烂漫一生 提交于 2019-12-05 03:33:20
I've been using Phing at work (it was set up when I got there), and thinking of using it for some personal projects. One thing I haven't got my head around yet though is what the big appeal is? What, if any, are the killer features of Phing or Ant? What are the big reasons people choose to use them instead of (for example) just a collection of bash scripts that execute their build actions? I'm sure I'm missing the obvious, hopefully someone can help me. While I understand that some people may prefer not to use phing/ant, I'm hoping to hear from people who do prefer them about why they prefer

Echo linebreak to file using Phing on Windows

一个人想着一个人 提交于 2019-12-05 01:20:21
In my build script I'm trying to output the date and SVN revision number to a file in the build directory. I would like the date and revision number on separate line, but can't get a linebreak to output to the file. I've tried all sorts of methods: <echo file="${build.dir}\build.txt">DATE = ${DATE} \r\n \\\r\\\n PHP_EOL</echo> <echo msg="DATE: ${DATE} \r\n \\\r\\\n PHP_EOL 0x0D0A SVN revision: ${svn.lastrevision} . PHP_EOL" file="${build.dir}\build.txt" append="true" /> Has anyone else managed to get a linebreak through to file with Phing? I've looked at the code in phing, and it uses fwrite.