Your SlideShare is downloading. ×
0
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Building com Phing - 7Masters PHP

2,012

Published on

Apresentação de Anderson Duodraco, no 7Masters - Encontro iMasters de Especialistas em PHP - Janeiro/2013

Apresentação de Anderson Duodraco, no 7Masters - Encontro iMasters de Especialistas em PHP - Janeiro/2013

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,012
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Building com Phing (em 7 minutos) Duodraco PHPSP Arizona
  • 2. Build em PHP?● Build = automação de processos – Testes e artefatos de QA – Deployment – Atualização – Distribuição – Verificação
  • 3. Phing● PHing Is Not Gnumake● http://phing.info● Sintaxe do Apache Ant – Buildfile com XML● Lógica● Tarefas Core● Tarefas Opcionais
  • 4. Estrutura <project default=””> <target name=””> <task_a param=””/> <task_b param=””> <aux name=”” value=””/> </task_b> </target> </project
  • 5. Copiando o projeto... <target name=”le_deploy”> <copy todir=”/var/www”> <fileset dir="."> <exclude name=".git" /> </fileset> </copy> </target>
  • 6. PHPUnit... <target name=”phpunit”> <phpunit bootstrap="src/autoload.php" codecoverage="true" haltonfailure="true" haltonerror="true"> <formatter type="plain" usefile="false"/> <batchtest> <fileset dir="tests"> <include name="**/*Test*.php"/> </fileset> </batchtest> </phpunit> </target>
  • 7. Checando dependencias <target name=”check_dep”> <composer command=”update”/> </target>● composer.json { require:{ “php”:”>5.4.0”, “ext-imagick”:”*”, “monolog/monolog”:”0.8.*” } }
  • 8. Variáveis● build.properties app.version=13.04 path.log=/var/log/myapps/app.log path.webroot=/var/www● build.xml <properties file=”build.properties”/> <echo msg=”App ver. ${app.version}”/> <copy todir=”${path.webroot}”> ...
  • 9. Combinando tarefas <target name=”phpunit”> … <target name=”pdepend”> … <target name=”phpcpd”> … <target name=”qa” depends=”phpcpd,pdepend,phpunit”>
  • 10. Organizando <target name=”qa”> <phing phingfile="qa.xml" inheritRefs="true" target="qa-tests" /> </target> <target name=”deploy”> <phing phingfile="deploy.xml" inheritRefs="true" target="install" /> </target>
  • 11. Executando...● # phing● # phing -f appbuild.xml● # phing nossotarget
  • 12. Instalando...● pear # pear channel-discover pear.phing.info # pear install -a phing/phing● composer phing/phing
  • 13. Obrigadohttp://duodra.co

×