-
Notifications
You must be signed in to change notification settings - Fork 7
Added taskfile #265
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
Merged
Parent:
WIP: Release/3.0.0
Merged
Added taskfile #265
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6ff685c
5289: taskfile added
1079927
5289: yaml added to taskfile
98d36bc
5289: add code analysis to composer
bb0fff9
5289: changelog
46e0ad2
5289: add forgotten site open templates
f2030a2
5289 npm install before up
f640485
5289: change desc on open api docs
e6e74e3
5289 remove check and apply, only check
58700d1
5189: remove whitespace
d212417
5289: normalize composer
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,169 @@ | ||
| version: "3" | ||
|
|
||
| # https://taskfile.dev/usage/#env-files | ||
| dotenv: [".env.local", ".env"] | ||
|
|
||
| vars: | ||
| # https://taskfile.dev/reference/templating/ | ||
| BASE_URL: "{{.TASK_BASE_URL | default .COMPOSE_SERVER_DOMAIN | default .COMPOSE_DOMAIN }}" | ||
| DOCKER_COMPOSE: '{{ .TASK_DOCKER_COMPOSE | default "itkdev-docker-compose" }}' | ||
|
|
||
| tasks: | ||
| default: | ||
| desc: "List all tasks" | ||
| cmds: | ||
| - task --list-all | ||
| silent: true | ||
|
|
||
| compose: | ||
| desc: "Run `docker compose` command. Example: task compose -- up --detach." | ||
| cmds: | ||
| - "{{ .DOCKER_COMPOSE }} {{ .CLI_ARGS }}" | ||
|
|
||
| site-install: | ||
| prompt: "This will reset your setup. Continue?" | ||
| desc: "Install new os2display" | ||
| cmds: | ||
| - task compose -- down | ||
| - task compose -- pull | ||
| - task npm-install | ||
| - task compose-up | ||
| - task composer-install | ||
| - task db:migrate --yes | ||
| - task fixtures:load --yes | ||
| - task site-open | ||
| silent: true | ||
|
|
||
| site-open: | ||
| desc: "Opens admin, docs and client." | ||
| cmds: | ||
| - task site-open:admin | ||
| - task site-open:client | ||
| - task site-open:docs | ||
| - task site-open:templates | ||
| silent: true | ||
|
|
||
| site-open:admin: | ||
| desc: "Opens admin site." | ||
| cmds: | ||
| - open http://{{ .BASE_URL }} | ||
|
|
||
| site-open:client: | ||
| desc: "Opens client site." | ||
| cmds: | ||
| - open http://{{ .BASE_URL }}/client | ||
|
|
||
| site-open:docs: | ||
tuj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| desc: "Opens API docs page" | ||
| cmds: | ||
| - open http://{{ .BASE_URL }}/docs | ||
|
|
||
| site-open:templates: | ||
| desc: "Opens templates site." | ||
| cmds: | ||
| - open http://{{ .BASE_URL }}/template | ||
|
|
||
| npm-install: | ||
| desc: "Installs node dependencies with npm." | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" node npm install | ||
|
|
||
| composer: | ||
| desc: "Runs `composer` command. Example task composer -- install." | ||
| cmds: | ||
| - task compose -- exec phpfpm composer {{.CLI_ARGS}} | ||
| silent: true | ||
|
|
||
| compose-up: | ||
| desc: "Runs docker compose up." | ||
| cmds: | ||
| - task compose -- up --detach --remove-orphans | ||
| silent: true | ||
|
|
||
| composer-install: | ||
| desc: "Installs dependencies with composer." | ||
| cmds: | ||
| - task composer -- install {{.COMPOSER_INSTALL_ARGUMENTS}} {{.CLI_ARGS}} | ||
| silent: true | ||
|
|
||
| coding-standards:check: | ||
| desc: "Check coding standards" | ||
| cmds: | ||
| - task coding-standards:assets:check | ||
| - task coding-standards:php:check | ||
| - task coding-standards:markdown:check | ||
| - task coding-standards:yml:check | ||
|
|
||
| coding-standards:apply: | ||
| desc: "Apply coding standards" | ||
| cmds: | ||
| - task coding-standards:assets:apply | ||
| - task coding-standards:php:apply | ||
| - task coding-standards:markdown:apply | ||
| - task coding-standards:yml:apply | ||
| silent: true | ||
|
|
||
| coding-standards:yml:apply: | ||
| desc: Apply coding standards for yml | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" prettier '**/*.{yml,yaml}' --write | ||
|
|
||
| coding-standards:yml:check: | ||
| desc: Check coding standards for yml | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" prettier '**/*.{yml,yaml}' --check | ||
|
|
||
| coding-standards:assets:apply: | ||
| desc: Apply coding standards for assets | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" prettier 'assets/**/*.{css,scss}' --write | ||
| - docker compose run --rm --volume "$PWD:/md" prettier 'assets/**/*.{js,jsx}' --write | ||
|
|
||
| coding-standards:assets:check: | ||
| desc: Check coding standards for assets | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" prettier 'assets/**/*.{css,scss}' --check | ||
| - docker compose run --rm --volume "$PWD:/md" prettier 'assets/**/*.{js,jsx}' --check | ||
|
|
||
| coding-standards:markdown:apply: | ||
| desc: "Apply coding standards for Markdown" | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" markdownlint markdownlint --ignore '**/node_modules/**' --ignore '**/vendor/**' '*.md' 'documentation/*.md' --fix | ||
|
|
||
| coding-standards:markdown:check: | ||
| desc: "Check coding standards for Markdown" | ||
| cmds: | ||
| - docker compose run --rm --volume "$PWD:/md" markdownlint markdownlint --ignore '**/node_modules/**' --ignore '**/vendor/**' '*.md' 'documentation/*.md' | ||
|
|
||
| coding-standards:php:apply: | ||
| desc: "Apply coding standards for PHP" | ||
| cmds: | ||
| - task compose -- exec phpfpm vendor/bin/php-cs-fixer fix --diff | ||
| silent: true | ||
|
|
||
| coding-standards:php:check: | ||
| desc: "Check coding standards for PHP" | ||
| cmds: | ||
| - task compose -- exec phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff | ||
| silent: true | ||
|
|
||
| code-analysis: | ||
| desc: "Runs code analysis." | ||
| cmds: | ||
| - task composer -- code-analysis | ||
|
|
||
| fixtures:load: | ||
| prompt: "This will reset your content. Continue?" | ||
| desc: Apply fixtures | ||
| cmds: | ||
| - task compose -- exec phpfpm bin/console hautelook:fixtures:load --no-interaction | ||
| - task compose-up | ||
| silent: true | ||
|
|
||
| db:migrate: | ||
| prompt: "This will perform migrations on your db. Continue?" | ||
| desc: Run database migrations | ||
| cmds: | ||
| - task compose -- exec phpfpm bin/console doctrine:migrations:migrate --no-interaction | ||
| - task compose-up | ||
| silent: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.