Created
November 21, 2010 20:57
-
-
Save lovett/709141 to your computer and use it in GitHub Desktop.
Phing task for upgrading WordPress
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
<target name="wordpress.upgrade"> | |
<property name="tmp" value="/tmp" /> | |
<property name="src" value="${tmp}/wordpress" /> | |
<delete dir="${src}" includeemptydirs="true" failonerror="true" /> | |
<exec dir="${tmp}" command="curl -s http://wordpress.org/latest.tar.gz | tar -xz" /> | |
<delete dir="wp-admin" includeemptydirs="true" failonerror="true" /> | |
<delete dir="wp-includes" includeemptydirs="true" failonerror="true" /> | |
<move file="wp-config.php" tofile="wp-config.php.bak" overwrite="true"/> | |
<move file="share-via-email.php" tofile="share-via-email.bak" overwrite="true"/> | |
<delete> | |
<fileset dir="."> | |
<include name="*.html" /> | |
<include name="*.php" /> | |
<include name="*.txt" /> | |
</fileset> | |
</delete> | |
<exec command="cp -r ${src}/wp-admin ." /> | |
<exec command="cp -r ${src}/wp-includes ." /> | |
<exec command="cp ${src}/*.html ." /> | |
<exec command="cp ${src}/*.php ." /> | |
<exec command="cp ${src}/*.txt ." /> | |
<move file="wp-config.php.bak" tofile="wp-config.php" overwrite="true"/> | |
<move file="share-via-email.bak" tofile="share-via-email.php" overwrite="true"/> | |
<delete dir="${src}" includeemptydirs="true" failonerror="true" /> | |
<delete> | |
<fileset dir="."> | |
<include name="wp-config-sample.php" /> | |
</fileset> | |
</delete> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Handy for development environments, but not to be used on live/production sites obviously. :)