Created
July 11, 2018 16:25
-
-
Save zviryatko/ae09d14f423bab59344755668bf736b5 to your computer and use it in GitHub Desktop.
Phing tasks for local drupal development
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"?> | |
<!-- | |
- Phing configuration file | |
- | |
- Installation: | |
- `curl -OLsS https://www.phing.info/get/phing-latest.phar` | |
- `chmod +x phing-latest.phar` | |
- `mv phing-latest.phar /usr/local/bin/phing-latest` | |
- | |
- Configuration: | |
- Copy file to project root with name `build.xml` | |
- | |
- Run: | |
- `phing` - will run default target "update" | |
- or | |
- `phing sync` - will update db and files | |
- or | |
- `phing udpate html` - will update the code and rebuild css/js files | |
--> | |
<project name="Update" default="update" basedir="." description="a demo project"> | |
<target name="full-update" description="Make full update."> | |
<phingcall target="sync" /> | |
<phingcall target="update" /> | |
<phingcall target="html" /> | |
<exec command="./bin/drush browse" /> | |
</target> | |
<target name="update" description="Update the code, db and features."> | |
<exec command="git pull" logoutput="true" /> | |
<exec command="composer install" logoutput="true" /> | |
<exec command="./bin/drush updb --entity-updates -y" logoutput="true" /> | |
<exec command="./bin/drush -y cim" logoutput="true" /> | |
<exec command="./bin/drush -y csim stage" logoutput="true" /> | |
<exec command="./bin/drush cr" logoutput="true" /> | |
<echo message="Code update complete!" /> | |
</target> | |
<target name="sync" description="Download fresh db and files."> | |
<exec command="./bin/drush sql-sync @adagio.stage @self -y" logoutput="true" /> | |
<exec command="./bin/drush rsync @adagio.stage:%files @self:sites/default --exclude-paths=css:js:styles:php -y" logoutput="true" /> | |
<echo message="Download complete!" /> | |
</target> | |
<target name="html" description="Build slices"> | |
<exec command="npm install" dir="html" logoutput="true" /> | |
<exec command="npm run build" dir="html" logoutput="true" /> | |
<echo message="Slices updated" /> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment