Skip to content

Commit b34af90

Browse files
mondrakeenzolutions
authored andcommitted
[TravisCI] Create a local mirror Composer repository to load drupal/console from the git clone (#4137)
* Update services.yml * PHP 5.5.9 runs on Trusty, add PHP 7.4, drop HHVM * 1 * 2 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 9 * 10 * 11 * 12 * 12 * 13 * 13 * 15 * 16 * 17 * 18 * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update autoload.local.php.dist * Create a local mirror Composer repository to load drupal/console from the git clone
1 parent a4ce15b commit b34af90

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.travis.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,18 @@ before_script:
5050
export SIMPLETEST_DB="sqlite://localhost/sites/default/files/.ht.sqlite#drupalconsole"
5151
fi
5252
53-
# Get Drupal via git, and install it via Composer. Then, require
54-
# latest drupal/console at its master branch via Composer.
55-
- git clone --depth=50 --branch=$DRUPAL_BRANCH http://git.drupal.org/project/drupal.git $DRUPAL_PATH
53+
# Get Drupal via git, and install it via Composer.
54+
- git clone --depth=5 --branch=$DRUPAL_BRANCH http://git.drupal.org/project/drupal.git $DRUPAL_PATH
5655
- cd $DRUPAL_PATH
5756
- composer install --no-progress --no-suggest
58-
- composer require "drupal/console:dev-master" --no-progress --no-suggest
5957

60-
# Replace vendor/drupal/console with the one just being built from GitHub.
61-
- rm -rf $DRUPAL_PATH/vendor/drupal/console
62-
- mkdir -p $DRUPAL_PATH/vendor/drupal/console
63-
- cp -r $TRAVIS_BUILD_DIR/* $DRUPAL_PATH/vendor/drupal/console
64-
# Update drupal/console dependencies in case they have been changed in the
65-
# current build.
66-
- composer update drupal/console
58+
# Require drupal/console from the source just cloned from GitHub.
59+
- cd $TRAVIS_BUILD_DIR
60+
- git checkout -b travisci-run-branch
61+
- cd $DRUPAL_PATH
62+
- |
63+
composer config repositories.travisci-run '{"type": "path", "url": "$TRAVIS_BUILD_DIR", "options": {"symlink": false}}'
64+
- composer require "drupal/console:dev-travisci-run-branch" --no-progress --no-suggest
6765

6866
script:
6967
# Install Drupal site via drupal/console and show site status.

0 commit comments

Comments
 (0)