Skip to content

Change task build #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5bb1777
Modified changelog
martinyde Feb 19, 2025
49bfa7c
Moved pr.yml
martinyde Feb 19, 2025
230ffa3
Changed task
martinyde Feb 19, 2025
ed8eced
Changed task
martinyde Feb 19, 2025
29a85b8
Changed task
martinyde Feb 19, 2025
e218f8b
Changed task
martinyde Feb 19, 2025
73a6a16
Changed task
martinyde Feb 19, 2025
35d5058
Changed task
martinyde Feb 19, 2025
3bae283
Updated ifelse
martinyde Feb 19, 2025
44e8b2d
Updated task
martinyde Feb 19, 2025
f05f7f9
Updated task
martinyde Feb 19, 2025
abdbb5e
Updated task
martinyde Feb 19, 2025
b361de1
Updated task
martinyde Feb 19, 2025
27baafd
Updated task
martinyde Feb 20, 2025
da33af5
Updated task
martinyde Feb 20, 2025
84f774c
Updated task
martinyde Feb 20, 2025
13c25ff
Updated task
martinyde Feb 20, 2025
eccc49d
Added chack for CHangelog
martinyde Feb 20, 2025
4ff3587
Modified changelog
martinyde Feb 20, 2025
5ea19fb
Updated tasks
martinyde May 2, 2025
12f6973
Updated tasks
martinyde May 2, 2025
cca0f40
Test platform req
martinyde Jun 10, 2025
ff6077d
Test platform req
martinyde Jun 10, 2025
c8b7660
Updated command
martinyde Jun 10, 2025
a602203
Added theme
martinyde Jun 11, 2025
16ea8ea
Updated minimumstability
martinyde Jun 11, 2025
fa8f786
Updated base theme
martinyde Jun 11, 2025
f7e9630
Added script and theme build
martinyde Jun 19, 2025
d2095e9
Removed test-prune-project github action after itkdev-docker-compose …
martinyde Jun 23, 2025
42e73f3
Removed changes to .env. applied by template:install
martinyde Jun 23, 2025
35d910e
Updated tasks
martinyde Jun 23, 2025
1b8b194
Updated task file
martinyde Jun 24, 2025
6bdd574
Changed themename and added node container
martinyde Jun 24, 2025
42c3595
Added prettier to coding standards checks
martinyde Jun 25, 2025
79ac6eb
Updated Readme Taskfile and composer
martinyde Jun 27, 2025
8f1fa1c
Released base theme version
martinyde Jun 27, 2025
494d61b
Removed internal settings
martinyde Jun 27, 2025
84fb729
Removed internal settings
martinyde Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 0 additions & 167 deletions .github/workflows/pr.yml

This file was deleted.

18 changes: 8 additions & 10 deletions .github/workflows/template_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ on:
pull_request:

jobs:
test-prune-project:
changelog:
runs-on: ubuntu-latest
name: Test prune project
env:
PROJECT_NAME: my-test-project
name: Changelog should be updated
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

# https://taskfile.dev/installation/#github-actions
- name: Setup Task
uses: arduino/setup-task@v2
- name: Git fetch
run: git fetch

- name: Prune project
run: |
task template-prune PROJECTNAME=$PROJECT_NAME
- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
18 changes: 0 additions & 18 deletions .markdownlint.jsonc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config/
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ and this project adheres to [Semantic Versioning].

## [Unreleased]

* [PR-7](https://github.com/itk-dev/drupal-11-template/pull/7)
Miscellaneous
## [1.0.0]

### Added

* Template files added

### Changed

* [PR-9](https://github.com/itk-dev/drupal-11-template/pull/9)
- Fixed github actions.
* [PR-7](https://github.com/itk-dev/drupal-11-template/pull/7)
- Miscellaneous

[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
[Unreleased]: https://github.com/itk-dev/drupal-11-template/compare/main...develop
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ Build a new project using this template (replace `{REPO_NAME}` with a proper Git
gh repo create itk-dev/{REPO_NAME} --template itk-dev/drupal-11-template --public --clone
```

Install the newest docker compose setup from [https://github.com/itk-dev/devops_itkdev-docker](https://github.com/itk-dev/devops_itkdev-docker).

```shell
task docker:install
```

### Prune the project

Prune the project to remove/override template specific files and set up the
Expand Down
43 changes: 22 additions & 21 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
version: '3'

dotenv: [".task.env", ".env"]
dotenv: [".env.task", ".env"]

tasks:
template-prune:
name: Prune installation
desc: Update the repository's files to match current project name
cmds:
- |
cat <<'EOF' > .env
COMPOSE_PROJECT_NAME={{.PROJECTNAME}}
COMPOSE_DOMAIN={{.PROJECTNAME}}.local.itkdev.dk
EOF
- rm -R web/themes/custom/TEMPLATE_THEME
- |
cat <<'EOF' >> deploy-templates/settings.local.php

/**
* Set trusted host pattern.
*/
$settings['trusted_host_patterns'][] = '^{{.PROJECTNAME}}\.local\.itkdev\.dk$';
EOF
# Modify contents of settings.local.yml and create .env file.
- PROJECTNAME={{.PROJECTNAME}} ./deploy-templates/scripts/modifyFilesContent.sh

# Add docker setup
- task docker:install

# Move Drupal configuration files into place.
- mkdir -p web/sites/default
- mv deploy-templates/{settings.local.php,services.local.yml} web/sites/default/

# Set the actual project name in select files (Sed command different between mac and linux).
- task rename

# Remove build scripts
- rm -Rf deploy-templates/scripts

# Move the rest of the files "here"
- mv deploy-templates/* .
# Set the actual project name in select files.
- sed -i '' -e 's/{PROJECTNAME}/{{.PROJECTNAME}}/g' README.md CHANGELOG.md
# Remove deploy templates
- rmdir deploy-templates
# Remove workflows that make sense only in the template project
- rm .github/workflows/template_*.yml

requires:
vars:
- PROJECTNAME
Expand All @@ -41,7 +37,12 @@ tasks:
msg: "PROJECTNAME should only contain lowercase a-z, digits and hyphens"

docker:install:
name: Install ITKDev docker compose
desc: Install docker compose templates (to get the newest version)
cmds:
- itkdev-docker-compose template:install drupal-10 --force
- itkdev-docker-compose template:install drupal-11 --force

rename:
desc: Sed command fails in github actions, so we require darwin platform to avoid. @todo better approach.
cmds:
- docker run --rm --volume=$PWD:/app itkdev/php8.3-fpm:latest sed -i -e 's/{PROJECTNAME}/{{.PROJECTNAME}}/g' README.md CHANGELOG.md
platforms: ['darwin']
Loading