-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
81 lines (71 loc) · 2.51 KB
/
Copy pathTaskfile.yml
File metadata and controls
81 lines (71 loc) · 2.51 KB
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
# https://taskfile.dev
version: "3"
tasks:
coding-standards:markdown:apply:
desc: Apply Markdown coding standards
cmds:
- task: compose
vars:
TASK_ARGS: run --rm markdownlint markdownlint '**/*.md' --fix
coding-standards:markdown:check:
desc: Apply and check Markdown coding standards
cmds:
- task: coding-standards:markdown:apply
- task: compose
vars:
TASK_ARGS: run --rm markdownlint markdownlint '**/*.md'
coding-standards:php:apply:
desc: Apply PHP coding standards
cmds:
- task: php
vars:
TASK_ARGS: vendor/bin/phpcbf
coding-standards:php:check:
desc: Apply and check PHP coding standards
cmds:
- task: coding-standards:php:apply
- task: php
vars:
TASK_ARGS: vendor/bin/phpcs
coding-standards:check:
desc: Apply and check coding standards
cmds:
- task: coding-standards:markdown:check
- task: coding-standards:php:check
code-analysis:
desc: Analyse code
cmds:
- ./scripts/code-analysis
build:pretix-api-client:
desc: Build customized version of https://github.com/itk-dev/pretix-api-client-php/
cmds:
- curl --silent --location https://github.com/itk-dev/pretix-api-client-php/archive/refs/tags/1.2.0.tar.gz > /tmp/pretix-api-client-php.tar.gz
# Extract src folder from archive into src/Pretix
- mkdir -p src/Pretix/ApiClient
- tar xvf /tmp/pretix-api-client-php.tar.gz --directory=src/Pretix/ApiClient --strip-components=2 pretix-api-client-php-1.2.0/src
# Change namespace
- docker compose run --rm php sed --in-place 's@ItkDev\\Pretix\\Api@Drupal\\dpl_pretix\\Pretix\\ApiClient@' $(find src/Pretix/ApiClient -name '*.php')
# Remove use of https://symfony.com/doc/current/components/options_resolver.html
- patch --strip=1 < src/Pretix/ApiClient/patches/pretix-api-client.patch
# Add missing functions
- patch --strip=1 < src/Pretix/ApiClient/patches/pretix-api-client-functions.patch
compose:
cmds:
- docker compose {{.TASK_ARGS}} {{.CLI_ARGS}}
internal: true
php:
desc: Run php command
cmds:
- task: compose
vars:
TASK_ARGS: pull --ignore-buildable
- task: compose
vars:
TASK_ARGS: build
- task: compose
vars:
TASK_ARGS: run --rm phpfpm composer install
- task: compose
vars:
TASK_ARGS: run --rm --interactive --tty phpfpm {{.TASK_ARGS}} {{.CLI_ARGS}}
internal: true