Skip to content

Instantly share code, notes, and snippets.

@vdubyna
Created September 24, 2012 12:36
Show Gist options
  • Save vdubyna/3775754 to your computer and use it in GitHub Desktop.
Save vdubyna/3775754 to your computer and use it in GitHub Desktop.
Phing magento installation
install.mysql.host=127.0.0.1
install.mysql.db=mage17_dev
install.mysql.user=root
install.mysql.password=
install.host=http://mage17.dev/
install.timezone=Europe/Kiev
install.admin.login=admin
install.admin.password=qwer1234
install.admin.email=vovikha@gmail.com
<?xml version="1.0" encoding="UTF-8"?>
<project name="Test Build" default="default">
<property file="build.properties"/>
<property name="appdir" value="${project.basedir}/.."/>
<target name="default">
<echo message="Check Successful!"/>
</target>
<target name="prepare">
<echo message="Delete local.xml"/>
<delete file="${appdir}/app/etc/local.xml"/>
<echo message="Drop db"/>
<exec command="mysql -h${install.mysql.host} -u${install.mysql.user} --password='${install.mysql.password}' -e'DROP DATABASE IF EXISTS ${install.mysql.db}'"
checkreturn="true" passthru="true" />
<echo message="Create db"/>
<exec command="mysql -h${install.mysql.host} -u${install.mysql.user} --password='${install.mysql.password}' -e'CREATE DATABASE ${install.mysql.db}'"
checkreturn="true" passthru="true" />
</target>
<target name="install" depends="prepare">
<echo message="Start install"/>
<exec command="php -f ${appdir}/install.php -- --license_agreement_accepted yes \
--locale en_US --timezone ${install.timezone} --default_currency USD \
--db_host ${install.mysql.host} --db_name ${install.mysql.db} \
--db_user ${install.mysql.user} --db_pass '${install.mysql.password}' \
--url '${install.host}' --use_rewrites yes --skip_url_validation yes \
--use_secure no --use_secure_admin no --secure_base_url '${install.host}' \
--admin_lastname Owner --admin_firstname Store \
--admin_email ${install.admin.email} --admin_username ${install.admin.login} \
--admin_password ${install.admin.password}"
checkreturn="true" passthru="true"/>
<echo message="Installation finished"/>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment