Skip to content

Instantly share code, notes, and snippets.

@fdewinne
Created October 1, 2015 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fdewinne/7c0ec9b4b35432414fee to your computer and use it in GitHub Desktop.
Save fdewinne/7c0ec9b4b35432414fee to your computer and use it in GitHub Desktop.
grunt aws continuousphp
node.bindir=${project.basedir}/node_modules/.bin
bower.bin=${node.bindir}/bower
grunt.bin=${node.bindir}/grunt
user.home=/home/cphp
<project name="continuousphp WebApp" default="help" basedir=".">
<property file="./build.properties" />
<target name="help" description="List available targets">
<exec executable="vendor/bin/phing"
passthru="true">
<arg value="-l"/>
</exec>
</target>
<target name="bundler">
<exec dir="${project.basedir}"
command="rbenv versions ; rbenv local 2.0.0-p645 ; ruby -v ; bundle install"
checkreturn="true"
passthru="true" />
</target>
<target name="npm">
<exec dir="${project.basedir}"
command="npm install"
checkreturn="true"
passthru="true" />
</target>
<target name="bower">
<exec dir="${project.basedir}"
command="${bower.bin} install"
checkreturn="true"
passthru="true" />
</target>
<target name="aws-credentials">
<property file="${user.home}/.aws/credentials" />
<echo message="{&quot;key&quot;:&quot;${aws_access_key_id}&quot;,&quot;secret&quot;:&quot;${aws_secret_access_key}&quot;}"
file="./grunt-aws.json"/>
</target>
<target name="setup" description="Build application dependencies" depends="bundler, npm, bower" />
<target name="build" description="Build application and dependencies" depends="setup">
<exec dir="${project.basedir}"
command="${grunt.bin} build:${env}"
checkreturn="true"
passthru="true" />
</target>
<target name="deploy" description="Build application and dependencies" depends="setup, aws-credentials">
<exec dir="${project.basedir}"
command="${grunt.bin} deploy:${env}"
checkreturn="true"
passthru="true" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment