From 3aa767e83d47eca9e34675d01fdf5115866df758 Mon Sep 17 00:00:00 2001 From: Bec White Date: Thu, 10 Mar 2022 18:00:10 -0600 Subject: [PATCH] Fix shell script installer, since Composer 2.2 proxies scripts in the vendor/bin/ directory differently. --- bin/the-build-installer | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/bin/the-build-installer b/bin/the-build-installer index fc965f9d..0a6ae334 100755 --- a/bin/the-build-installer +++ b/bin/the-build-installer @@ -1,20 +1,10 @@ #!/bin/sh # # Wrapper for our install command; at least this way it's somewhat discoverable. -# Previously: +# +# Essentially, this runs: # vendor/bin/phing -f vendor/palantirnet/the-build/targets/install.xml +# +# This script assumes that the composer bin dir is at vendor/bin/. -# Relative path to this script. -SCRIPT=$(readlink "$0") - -# Absolute path to this script's parent directory. -SCRIPTPATH=$(cd `dirname $0` && cd `dirname $SCRIPT` && pwd) - -REPOPATH=$(cd `dirname $SCRIPTPATH` && cd ../../../ && pwd) - -if [ "$REPOPATH" = `pwd` ]; then - # Run our install task. - $SCRIPTPATH/../../../bin/phing -f $SCRIPTPATH/../targets/install.xml -else - echo "Please run this command from your project root." -fi +(cd $COMPOSER_BIN_DIR/../../ && $COMPOSER_BIN_DIR/phing -f $COMPOSER_BIN_DIR/../palantirnet/the-build/targets/install.xml)