|
7 | 7 | # https://taskfile.dev/reference/templating/ |
8 | 8 | BASE_URL: '{{.TASK_BASE_URL | default .COMPOSE_SERVER_DOMAIN | default .COMPOSE_DOMAIN | default "https://hoeringsportal.local.itkdev.dk"}}' |
9 | 9 | DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}' |
| 10 | + DOCKER_COMPOSE_PROFILES: '{{.TASK_DOCKER_COMPOSE_PROFILES | default ""}}' |
10 | 11 | COMPOSER_INSTALL_ARGUMENTS: '{{.TASK_COMPOSER_INSTALL_ARGUMENTS | default ""}}' |
11 | 12 |
|
12 | 13 | PRETIX_URL: '{{.TASK_PRETIX_URL | default "http://pretix.hoeringsportal.local.itkdev.dk"}}' |
@@ -64,15 +65,23 @@ tasks: |
64 | 65 |
|
65 | 66 | assets-build: |
66 | 67 | cmds: |
67 | | - - '{{.DOCKER_COMPOSE}} run --rm node npm install --prefix web/themes/custom/hoeringsportal' |
68 | | - - '{{.DOCKER_COMPOSE}} run --rm node npm run build --prefix web/themes/custom/hoeringsportal' |
| 68 | + - | |
| 69 | + if [[ -z "{{.SKIP_BUILD}}" ]]; then |
| 70 | + echo {{.DOCKER_COMPOSE}} run --rm node npm install --prefix web/themes/custom/hoeringsportal |
| 71 | + echo {{.DOCKER_COMPOSE}} run --rm node npm run build --prefix web/themes/custom/hoeringsportal |
| 72 | + fi |
| 73 | + vars: |
| 74 | + SKIP_BUILD: '{{.ASSETS_SKIP_BUILD | default .TASK_ASSETS_SKIP_BUILD}}' |
| 75 | + |
69 | 76 | compose: |
70 | 77 | cmds: |
71 | | - - '{{.DOCKER_COMPOSE}} --profile pretix {{.CLI_ARGS}}' |
| 78 | + - '{{.DOCKER_COMPOSE}} {{if .DOCKER_COMPOSE_PROFILES}}--profile {{.DOCKER_COMPOSE_PROFILES | splitList "," |join " --profile " }}{{end}} {{.CLI_ARGS}}' |
| 79 | + vars: |
| 80 | + DOCKER_COMPOSE_PROFILES: '{{.PROFILES | default .DOCKER_COMPOSE_PROFILES}}' |
72 | 81 |
|
73 | 82 | compose-up: |
74 | 83 | cmds: |
75 | | - - task compose -- up --detach --remove-orphans --wait |
| 84 | + - task compose -- up --detach --remove-orphans {{if .COMPOSE_UP_WAIT}}--wait{{end}} |
76 | 85 | silent: true |
77 | 86 |
|
78 | 87 | composer: |
@@ -225,9 +234,12 @@ tasks: |
225 | 234 | fixtures:load: |
226 | 235 | prompt: "This will reset your content. Continue?" |
227 | 236 | cmds: |
228 | | - - task drush -- --yes pm:enable hoeringsportal_base_fixtures $(find web/modules/custom -type f -name 'hoeringsportal_*_fixtures.info.yml' -exec basename -s .info.yml {} \;) |
229 | | - - task drush -- --yes content-fixtures:load |
230 | | - - task drush -- --yes pm:uninstall content_fixtures |
| 237 | + # We need the pretix service to load public meeting fixtures. |
| 238 | + - PROFILES=pretix COMPOSE_UP_WAIT=true task compose-up |
| 239 | + - task drush -- --yes pm:enable hoeringsportal_base_fixtures $(find web/modules/custom -type f -name 'hoeringsportal_*_fixtures.info.yml' -exec basename -s .info.yml {} \;) |
| 240 | + - task drush -- --yes content-fixtures:load |
| 241 | + - task drush -- --yes pm:uninstall content_fixtures |
| 242 | + - task compose-up |
231 | 243 | silent: true |
232 | 244 |
|
233 | 245 | translations:import: |
|
0 commit comments