Skip to content

Instantly share code, notes, and snippets.

@harikt
Forked from stanlemon/deploy
Last active August 29, 2015 13:59
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 harikt/10571128 to your computer and use it in GitHub Desktop.
Save harikt/10571128 to your computer and use it in GitHub Desktop.
#!/bin/bash
# This deploy hook gets executed after dependencies are resolved and the
# build hook has been run but before the application has been started back
# up again. This script gets executed directly, so it could be python, php,
# ruby, etc.
export COMPOSER_HOME="$OPENSHIFT_DATA_DIR/.composer"
if [ ! -f "$OPENSHIFT_DATA_DIR/composer.phar" ]; then
curl -s https://getcomposer.org/installer | php -- --install-dir=$OPENSHIFT_DATA_DIR
else
php $OPENSHIFT_DATA_DIR/composer.phar self-update
fi
( unset GIT_DIR ; cd $OPENSHIFT_REPO_DIR ; php $OPENSHIFT_DATA_DIR/composer.phar install )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment