You are here

install.sh in Acquia Content Hub 8

Same filename and directory in other branches
  1. 8.2 tests/travis/install.sh
#!/usr/bin/env bash

# NAME
#     install.sh - Install Travis CI dependencies
#
# SYNOPSIS
#     install.sh
#
# DESCRIPTION
#     Creates the test fixture.

cd "$(dirname "$0")" || exit; source _includes.sh

# Create a fixture for the DEPLOY job.
if [[ "$DEPLOY" ]]; then
  mysql -e 'CREATE DATABASE drupal;'
  orca fixture:init \
    -f \
    --sut=drupal/acquia_contenthub \
    --sut-only \
    --core="$CORE" \
    --no-sqlite \
    --no-site-install
  cd "$ORCA_FIXTURE_DIR/docroot/sites/default" || exit 1
  cp default.settings.php settings.php
  chmod 775 settings.php
  drush site:install \
    minimal \
    --db-url=mysql://root:@127.0.0.1/drupal \
    --site-name=ORCA \
    --account-name=admin \
    --account-pass=admin \
    --no-interaction \
    --verbose \
    --ansi
fi

DRUPAL_CORE=9;
if [[ "$ORCA_JOB" == "INTEGRATED_TEST_ON_OLDEST_SUPPORTED" || "$ORCA_JOB" == "INTEGRATED_TEST_ON_LATEST_LTS" || $DEPLOY || $DO_DEV ]]; then
  DRUPAL_CORE=8;
fi

# Exit early in the absence of a fixture.
[[ -d "$ORCA_FIXTURE_DIR" ]] || exit 0

composer -d"$ORCA_FIXTURE_DIR" require drupal/paragraphs

# Install symfony/phpunit-bridge depending on Drupal Core version.
if [[ "$DRUPAL_CORE" == "9" ]]; then
  composer -d"$ORCA_FIXTURE_DIR" require symfony/phpunit-bridge --dev
else
  composer -d"$ORCA_FIXTURE_DIR" require symfony/phpunit-bridge "^3.4.3" --dev
fi

File

tests/travis/install.sh
View source
  1. #!/usr/bin/env bash
  2. # NAME
  3. # install.sh - Install Travis CI dependencies
  4. #
  5. # SYNOPSIS
  6. # install.sh
  7. #
  8. # DESCRIPTION
  9. # Creates the test fixture.
  10. cd "$(dirname "$0")" || exit; source _includes.sh
  11. # Create a fixture for the DEPLOY job.
  12. if [[ "$DEPLOY" ]]; then
  13. mysql -e 'CREATE DATABASE drupal;'
  14. orca fixture:init \
  15. -f \
  16. --sut=drupal/acquia_contenthub \
  17. --sut-only \
  18. --core="$CORE" \
  19. --no-sqlite \
  20. --no-site-install
  21. cd "$ORCA_FIXTURE_DIR/docroot/sites/default" || exit 1
  22. cp default.settings.php settings.php
  23. chmod 775 settings.php
  24. drush site:install \
  25. minimal \
  26. --db-url=mysql://root:@127.0.0.1/drupal \
  27. --site-name=ORCA \
  28. --account-name=admin \
  29. --account-pass=admin \
  30. --no-interaction \
  31. --verbose \
  32. --ansi
  33. fi
  34. DRUPAL_CORE=9;
  35. if [[ "$ORCA_JOB" == "INTEGRATED_TEST_ON_OLDEST_SUPPORTED" || "$ORCA_JOB" == "INTEGRATED_TEST_ON_LATEST_LTS" || $DEPLOY || $DO_DEV ]]; then
  36. DRUPAL_CORE=8;
  37. fi
  38. # Exit early in the absence of a fixture.
  39. [[ -d "$ORCA_FIXTURE_DIR" ]] || exit 0
  40. composer -d"$ORCA_FIXTURE_DIR" require drupal/paragraphs
  41. # Install symfony/phpunit-bridge depending on Drupal Core version.
  42. if [[ "$DRUPAL_CORE" == "9" ]]; then
  43. composer -d"$ORCA_FIXTURE_DIR" require symfony/phpunit-bridge --dev
  44. else
  45. composer -d"$ORCA_FIXTURE_DIR" require symfony/phpunit-bridge "^3.4.3" --dev
  46. fi