From 7b0f9595ee4898889303b6ca1e48a092bbad8b30 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 12:50:22 +0000 Subject: [PATCH 1/7] Try some composer stuff. --- tests/scripts/travis_setup.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index 4e9a3563..fe012dd1 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -12,14 +12,12 @@ export CATALINA_HOME='.' export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -Djavax.net.ssl.trustStore=$CATALINA_HOME/fedora/server/truststore -Djavax.net.ssl.trustStorePassword=tomcat" ./bin/startup.sh cd $HOME +pear channel-discover pear.drush.org pear upgrade --force Console_Getopt pear upgrade --force pear pear channel-discover pear.drush.org -pear channel-discover pear.drush.org -pear channel-discover pear.phpqatools.org -pear channel-discover pear.netpirates.net -pear install pear/PHP_CodeSniffer -pear install pear.phpunit.de/phpcpd + +composer global require squizlabs/php_codesniffer sebastian/phpcpd # Install Drush git clone https://github.com/drush-ops/drush.git From afeac089e404f8144b631e0a3928907eb91daf7d Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 12:55:51 +0000 Subject: [PATCH 2/7] The second... --- tests/scripts/travis_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index fe012dd1..ee6200d5 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -17,7 +17,7 @@ pear upgrade --force Console_Getopt pear upgrade --force pear pear channel-discover pear.drush.org -composer global require squizlabs/php_codesniffer sebastian/phpcpd +composer global require 'squizlabs/php_codesniffer=*' 'sebastian/phpcpd=*' # Install Drush git clone https://github.com/drush-ops/drush.git From 199f1699004aa8969bdf4e20a6073599ed63151b Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 13:01:28 +0000 Subject: [PATCH 3/7] Add "prefer-source" dealio. --- tests/scripts/travis_setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index ee6200d5..ada5c4c6 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -17,7 +17,8 @@ pear upgrade --force Console_Getopt pear upgrade --force pear pear channel-discover pear.drush.org -composer global require 'squizlabs/php_codesniffer=*' 'sebastian/phpcpd=*' +# "prefer-source" required due to SSL shenanigans on the Travis boxes... +composer global require --prefer-source 'squizlabs/php_codesniffer=*' 'sebastian/phpcpd=*' # Install Drush git clone https://github.com/drush-ops/drush.git From 6c6c66e5ad0a1216e3b30963d97e9450e9aefdf2 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 13:37:37 +0000 Subject: [PATCH 4/7] Throw stuff onto the PATH, 'cause Travis is silly. Really, how we're using it, I guess... Shrug. --- tests/scripts/travis_setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index ada5c4c6..264085d1 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -19,6 +19,9 @@ pear channel-discover pear.drush.org # "prefer-source" required due to SSL shenanigans on the Travis boxes... composer global require --prefer-source 'squizlabs/php_codesniffer=*' 'sebastian/phpcpd=*' +# Because we can't add to the PATH here and this file is used in many repos, +# let's just throw symlinks in. +find $HOME/.composer/vendor/bin -executable \! -type d -exec sudo ln -s {} /usr/local/sbin/ \; # Install Drush git clone https://github.com/drush-ops/drush.git From 34cd387bcaca859e899f75b172e0bffc96b7967a Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 14:26:19 +0000 Subject: [PATCH 5/7] Try to expose Composer's autoloading. --- tests/scripts/travis_setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index 264085d1..c619b2e9 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -35,6 +35,8 @@ phpenv rehash drush dl --yes drupal cd drupal-* drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes +# Needs to make things from Composer be available (PHP CS, primarily) +echo "include_once $HOME/.composer/vendor/autoload.php;" >> sites/default/settings.php drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/dev/null & ln -s $ISLANDORA_DIR sites/all/modules/islandora mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/islandora/tests/test_config.ini From e8390a99eec7fd6e6ef5cab5a7deb993746729ca Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 14:32:42 +0000 Subject: [PATCH 6/7] Ensure we can write to the settings.php --- tests/scripts/travis_setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index c619b2e9..7359fe0d 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -36,7 +36,9 @@ drush dl --yes drupal cd drupal-* drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes # Needs to make things from Composer be available (PHP CS, primarily) +sudo chmod a+w sites/default/settings.php echo "include_once $HOME/.composer/vendor/autoload.php;" >> sites/default/settings.php +sudo chmod a-w sites/default/settings.php drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/dev/null & ln -s $ISLANDORA_DIR sites/all/modules/islandora mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/islandora/tests/test_config.ini From cb22924a53af3c705a17656e437d589f757c331a Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Tue, 22 Apr 2014 14:39:46 +0000 Subject: [PATCH 7/7] Add missing quotes, 'cause derp. --- tests/scripts/travis_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index 7359fe0d..3991afcd 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -37,7 +37,7 @@ cd drupal-* drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes # Needs to make things from Composer be available (PHP CS, primarily) sudo chmod a+w sites/default/settings.php -echo "include_once $HOME/.composer/vendor/autoload.php;" >> sites/default/settings.php +echo "include_once '$HOME/.composer/vendor/autoload.php';" >> sites/default/settings.php sudo chmod a-w sites/default/settings.php drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/dev/null & ln -s $ISLANDORA_DIR sites/all/modules/islandora