Last active
June 15, 2017 17:44
-
-
Save karrikas/d195d526694c85a32bb5 to your computer and use it in GitHub Desktop.
Build file for deploy wordpress project from local to production server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="wordpress" default="deploy"> | |
<target name="deploy"> | |
<propertyprompt propertyName="rsync.type" promptText="Deploy? (test or yes)" defaultValue="test" /> | |
<if> | |
<equals arg1="${rsync.type}" arg2="yes" /> | |
<then> | |
<exec command="rsync --exclude-from='rsync_exclude' -e 'ssh -p 333' --delete-after -razv . sshuser@host.com:/final/path" outputProperty="info" /> | |
</then> | |
<else> | |
<exec command="rsync --exclude-from='rsync_exclude' -e 'ssh -p 333' --delete-after -razvn . sshuser@host.com:/final/path" outputProperty="info" /> | |
</else> | |
</if> | |
<echo msg="${info}" /> | |
</target> | |
<target name="db-clean-url"> | |
<exec command="wp search-replace 'localhost.com/path' 'fila-wordpress.com' --all-tables-with-prefix" outputProperty="info" /> | |
<echo msg="${info}" /> | |
<exec command="wp db export build/db-clean-url.sql" outputProperty="info" /> | |
<echo msg="${info}" /> | |
<exec command="wp search-replace 'fila-wordpress.com' 'localhost.com/path' --all-tables-with-prefix" outputProperty="info" /> | |
</target> | |
</project> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# common files | |
*.swp | |
*~ | |
.git | |
.gitignore | |
.htaccess | |
build.xml | |
build_rsync_exclude | |
build/ | |
#wordpress files | |
wp-config.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment