File tree Expand file tree Collapse file tree 3 files changed +29
-16
lines changed Expand file tree Collapse file tree 3 files changed +29
-16
lines changed Original file line number Diff line number Diff line change 7
7
name : Prune installation
8
8
desc : Update the repository's files to match current project name
9
9
cmds :
10
- - |
11
- cat <<'EOF' > .env
12
- COMPOSE_PROJECT_NAME={{.PROJECTNAME}}
13
- COMPOSE_DOMAIN={{.PROJECTNAME}}.local.itkdev.dk
14
- EOF
15
- - rm -R web/themes/custom/TEMPLATE_THEME
16
- - |
17
- cat <<'EOF' >> deploy-templates/settings.local.php
18
-
19
- /**
20
- * Set trusted host pattern.
21
- */
22
- $settings['trusted_host_patterns'][] = '^{{.PROJECTNAME}}\.local\.itkdev\.dk$';
23
- EOF
10
+ # Modify contents of settings.local.yml and create .env file.
11
+ - PROJECTNAME={{.PROJECTNAME}} ./deploy-templates/scripts/modifyFilesContent.sh
24
12
25
13
# Add docker setup
26
14
- task docker:install
@@ -33,13 +21,15 @@ tasks:
33
21
# Set the actual project name in select files (Sed command different between mac and linux).
34
22
- task rename
35
23
24
+ # Remove build scripts
25
+ - rmdir deploy-templates/scripts
26
+
36
27
# Move the rest of the files "here"
37
28
- mv deploy-templates/* .
38
29
# Remove deploy templates
39
30
- rmdir deploy-templates
40
31
# Remove workflows that make sense only in the template project
41
32
- rm .github/workflows/template_*.yml
42
-
43
33
requires :
44
34
vars :
45
35
- PROJECTNAME
Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ tasks:
24
24
build-site:new :
25
25
cmds :
26
26
- task drush -- site:install minimal -y
27
+ - task compose -- run phpfpm php /app/web/core/scripts/drupal generate-theme {{.THEMENAME}} --name="{{.THEMENAME_READABLE}}" --path="themes/custom" --starterkit=starterkit_project_theme
28
+ requires :
29
+ vars :
30
+ - THEMENAME
31
+ - THEMENAME_READABLE
32
+
33
+ preconditions :
34
+ - sh : " [[ {{.THEMENAME}} =~ ^[a-z\\ _]+$ ]]"
35
+ msg : " THEMENAME should only contain lowercase a-z and underscores"
27
36
28
37
build-site:existing-conf :
29
38
cmds :
38
47
39
48
check-code :
40
49
cmds :
41
- - docker run --rm --volume "$PWD:/md" peterdavehello /markdownlint markdownlint $(git ls-files * .md)
50
+ - docker run --rm --volume "$PWD:/md" itkdev /markdownlint '**/* .md'
42
51
- task composer -- code-analysis
43
52
- task composer -- coding-standards-check/twig-cs-fixer
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ file=" .env"
4
+ echo " COMPOSE_PROJECT_NAME=$PROJECTNAME " > $file
5
+ echo " COMPOSE_DOMAIN=$PROJECTNAME .local.itkdev.dk" >> $file
6
+ cat $file
7
+
8
+ file=" ./deploy-templates/settings.local.php"
9
+ echo " " >> $file
10
+ echo " /**" >> $file
11
+ echo " * Set trusted host pattern." >> $file
12
+ echo " */" >> $file
13
+ echo " \$ settings['trusted_host_patterns'][] = '^$PROJECTNAME \.local\.itkdev\.dk$';" >> $file
14
+ cat $file
You can’t perform that action at this time.
0 commit comments