cp $SHARE/drupal8/files/Puppetfile puppet/Puppetfile.drupal8
fi
+ if [ ! -e "bin/post-receive" ]; then
+ mkdir -p bin && cp $SHARE/drupal8/files/bin/post-receive bin/
+ fi
+
mkdir -p files config/sync themes modules libraries vendor
touch {files,config,themes,modules,libraries,vendor}/.empty
git add -f {files,config/sync,themes,modules,libraries}/.empty
# Post-receive git hook
#
+# Go to repository base
cd ..
unset GIT_DIR
-if [ -d ".git/annex" ]; then
- git annex sync
+# Check for a Makefile deploy target or run standard deployment
+if [ -e "Makefile" ] && grep -q "^deploy:" Makefile; then
+ make deploy
else
- git config receive.denyCurrentBranch ignore
- #git reset HEAD
- git checkout -f
-fi
+ if [ -d ".git/annex" ]; then
+ git annex sync
+ else
+ git config receive.denyCurrentBranch ignore
+ #git reset HEAD
+ git checkout -f
+ fi
-git submodule sync --recursive
-git submodule update --init --recursive
+ git submodule sync --recursive
+ git submodule update --init --recursive
-cd -
-exec git update-server-info
+ cd -
+ exec git update-server-info
+fi