#!/bin/bash

#ddev-generated
## Command provided by https://github.com/ddev/ddev-drupal-contrib
## Description: Add Drupal core and other needed dependencies.
## Usage: expand-composer-json [flags] [PROJECT_NAME]
## Example: "ddev expand-composer-json ctools"
## ProjectTypes: drupal8,drupal9,drupal10
## ExecRaw: true

export _WEB_ROOT=$DDEV_DOCROOT
[[ $DDEV_PROJECT_TYPE == "drupal10" ]] && export _TARGET_CORE=^10
[[ $DDEV_PROJECT_TYPE == "drupal9" ]] && export _TARGET_CORE=^9
[[ $DDEV_PROJECT_TYPE == "drupal8" ]] && export _TARGET_CORE=^8
cd "$DDEV_COMPOSER_ROOT" || exit
curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/scripts/expand_composer_json.php
php expand_composer_json.php "$DDEV_SITENAME"
rm -f expand_composer_json.php
