Skip to content

Commit

Permalink
UADIGITAL-2143 Landofile Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tadean authored and uaz-web-readonly-bot committed Oct 16, 2019
1 parent 871c6f0 commit e9d1795
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,30 @@ config:
services:
appserver:
build:
- composer install -o --no-dev
- composer global require hirak/prestissimo && composer install -o
tooling:
# Provide a command to install Drupal.
# Current versions of the Bitnami MySQL container sometimes signal
# healthy before MySQL is fully started. This can result in MySQL errors
# in a race condition if Drupal is installed during the run phase.
quickstart-install:
service: appserver
cmd: drush --root=/app/web site:install --account-mail=noreply@email.arizona.edu --account-name=quickstart_admin --account-pass=lando --db-url=mysql://drupal8:drupal8@database:3306/drupal8 -y --verbose
# Provide tooling to set the Quickstart dependency.
quickstart-branch:
service: appserver
cmd: /app/quickstart_branch.sh
level: app
options:
branch:
passthrough: true
describe: Branch to use, e.g. UADIGITAL-1234.
interactive:
type: input
message: Branch to use, e.g. UADIGITAL-1234.
default: master
weight: 600
# Provide Drush tooling to automatically know the Drupal root.
drush:
service: appserver
cmd: drush --root=/app/web
34 changes: 34 additions & 0 deletions quickstart_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
#
# Set the requested quickstart branch of the quickstart composer package.

# Default to the master branch.
BRANCH="master"

# Parse options
while (( "$#" )); do
case "$1" in
--branch|--branch=*)
if [ "${1##--branch=}" != "$1" ]; then
BRANCH="${1##--branch=}"
shift
else
BRANCH=$2
shift 2
fi
;;
-*|--*=)
echo "Error: Unsupported flag $1" >&2
exit 1
;;
*)
shift
;;
esac
done

# Compute the expected composer package name of the requested branch.
BRANCH="dev-${BRANCH}"

# Install and fetch dependencies for the requested branch
composer require "az-digital/az_quickstart:$BRANCH"

0 comments on commit e9d1795

Please sign in to comment.