Skip to content

Commit bfa9ed2

Browse files
committed
Moving Composer check
1 parent 08558b1 commit bfa9ed2

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

.openshift/action_hooks/build

Lines changed: 0 additions & 13 deletions
This file was deleted.

misc/make_php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,26 @@ function check_php() {
7070

7171
echo "Check PHP ${DIST_PHP_VER} Failed. Start installing"
7272
install_php
73+
}
74+
75+
function check_composer() {
76+
77+
export PATH=${OPENSHIFT_HOMEDIR}/app-root/runtime/bin/:${PATH}
78+
export COMPOSER_HOME="$OPENSHIFT_DATA_DIR/.composer"
79+
80+
if [ ! -f "$OPENSHIFT_DATA_DIR/composer.phar" ]; then
81+
curl -s https://getcomposer.org/installer | php -- --install-dir=$OPENSHIFT_DATA_DIR
82+
else
83+
php $OPENSHIFT_DATA_DIR/composer.phar self-update
84+
fi
85+
86+
( unset GIT_DIR ; cd $OPENSHIFT_REPO_DIR ; php $OPENSHIFT_DATA_DIR/composer.phar install )
87+
88+
}
89+
90+
function check_all() {
91+
92+
check_php
93+
check_composer
94+
7395
}

0 commit comments

Comments
 (0)