This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
100 lines (89 loc) · 2.67 KB
/
Taskfile.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# https://taskfile.dev
version: 3
tasks:
drupal:getdb:
desc: "Fetch database dump"
dir: drupal
cmds:
- rm -fr docker/db/fetch
- mkdir -p docker/db/fetch
- platform db:dump -e {{.ENV}} --app drupal -p kigwipdp3tsiq --gzip -d docker/db/fetch
- rm -f docker/db/initdb.d/*.gz
- mkdir -p docker/db/initdb.d/
- mv docker/db/fetch/* docker/db/initdb.d/
- rm -fr docker/db/fetch
vars:
ENV: '{{.ENV | default "master"}}'
api:reset:
desc: "Reset docker-environment and bring api back up"
dir: api
cmds:
- yarn install
- yarn start:dev
apps:build:
desc: "BUilds all apps"
dir: drupal/apps/jobs
cmds:
- yarn install
- yarn build
drupal:reset:
desc: "Reset docker-environment and bring site back up"
dir: drupal
cmds:
- scripts/docker-reset.sh
drupal:upgrade:core:
desc: "Upgrades core and performs an config export"
summary: |
Assumes docker-compose is up and running
dir: drupal
cmds:
- scripts/upgrade-core.sh
preconditions:
- sh: "docker compose ps php -q > /dev/null"
msg: "Could not detect running php container"
drupal:upgrade:module:
desc: "Upgrades a module and performes a config export"
summary: |
Assumes docker-compose is up and running.
Pass the module as argument via
task drupal:upgrade:module -- module
dir: drupal
cmds:
- scripts/upgrade-module.sh {{.CLI_ARGS}}
preconditions:
- sh: "docker compose ps php -q > /dev/null"
msg: "Could not detect running php container"
- sh: "test -n \"{{.CLI_ARGS}}\""
msg: "Please specify the module as the last argument"
drupal:upgrade:status:
desc: "Get a status for updatable composer packages"
summary: |
Assumes docker-compose is up and running
dir: drupal
cmds:
- docker compose exec php bash -c "cd .. && composer outdated"
preconditions:
- sh: "docker compose ps php -q > /dev/null"
msg: "Could not detect running php container"
drupal:xdebug:
desc: "start xdebug"
summary: |
Assumes docker-compose is up and running
dir: drupal
cmds:
- docker compose exec php bash -c "xdebug-start"
preconditions:
- sh: "docker compose ps php -q > /dev/null"
msg: "Could not detect running php container"
drupal:up:
desc: "Start Drupal site containers"
dir: drupal
cmds:
- docker compose up --remove-orphans -d
drupal:down:
desc: "Take down a running site removing any state"
dir: drupal
cmds:
- docker compose kill
- docker compose rm -v -f
- docker compose down --remove-orphans -v