forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 2
/
phapp.yml
52 lines (50 loc) · 1.89 KB
/
phapp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: {{ project }}
description: 'Describe your application.'
git:
url: '[email protected]:drunomics/{{ project }}.git'
commands:
setup: |
rm -rf .env && echo -e "####\n#### .env generated by \"phapp setup <env-id>\" - re-run phapp setup to update.\n####\n" > .env
cat .env-defaults >> .env
# Support per environment .env additions and local overrides.
[[ ! -f .env-$PHAPP_ENV.dist ]] || (cat .env-$PHAPP_ENV.dist >> .env)
[[ ! -f .env.local ]] || (cat .env.local >> .env)
echo "PHAPP_ENV=$PHAPP_ENV" > .current.env
./scripts/setup-base.sh
./scripts/generate-network-aliases.sh
environment: |
source dotenv/loader.sh
build: |
EXTRA_ARGS=$([[ $PHAPP_ENV_MODE = 'production' ]] && echo '--no-dev' || echo '');
composer install --ignore-platform-reqs --no-interaction $EXTRA_ARGS
clean: |
# Clean composer vendor via the provided script.
composer clean
status: |
drush status --fields=bootstrap | grep 'bootstrap' -q
init: |
./scripts/init-media-icons.sh &&
drush sql-create -y &&
zcat dumps/init.sql.gz | drush sql:cli &&
drush updatedb -y &&
# Skip config-import when there is no config.
if [ -f config/sync/core.extension.yml ]; then
drush phapp:apply-env-mode && drush cim -y && drush cr
fi &&
drush deploy:hook -y &&
drush locale:check && drush locale:update
install: |
./scripts/init-media-icons.sh &&
chmod +w web/sites/default &&
drush sql-create -y &&
SITE=${SITE:-default} &&
drush site-install -y --sites-subdir=$SITE --config-dir=../config/sync ${INSTALL_PROFILE:-minimal}
update: |
./scripts/init-media-icons.sh &&
drush updatedb -y &&
# Skip config-import when there is no config.
if [ -f config/sync/core.extension.yml ]; then
drush phapp:apply-env-mode && drush cim -y && drush cr
fi &&
drush deploy:hook -y &&
drush locale:check && drush locale:update