Skip to content

Instantly share code, notes, and snippets.

@ivoba
Created October 7, 2011 15:08
Show Gist options
  • Select an option

  • Save ivoba/1270478 to your computer and use it in GitHub Desktop.

Select an option

Save ivoba/1270478 to your computer and use it in GitHub Desktop.
silex, twig, boilerplate build post-merge hook
#!/bin/sh
#
# A hook script that is called after a successful
# merge is made.
# It triggers the boilerplate build.
#
# To enable this hook, make this file executable
# change to build dir
cd ../../build
echo "ANT: Running boilerplate build task..."
ant copyViews minify
antReturnCode=$?
echo "ANT: Return code is: \""$antReturnCode"\""
if [ $antReturnCode -ne 0 ];then
echo "BUILD ERROR: I am failing hard..."
exit 1;
else
echo "now copy over the optimized files"
cp -R ../publish/views/* ../views/
rm -r ../publish/views/
cp -R ../publish/* ../web/
exit 0;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment