Skip to content
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

Add optional user tasks to Taskfile.yaml #1354

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

wasurerarenai
Copy link
Contributor

Go-task supports including optional user taskfiles and directories . This allows us to use our own custom tasks without needing to edit the repo root Taskfile.yaml. Useful for reducing merge conflicts in the future for those following along with the cluster-template's regular updates.

Example:

$ find .taskfiles/User
.taskfiles/User
.taskfiles/User/app1
.taskfiles/User/app1/Taskfile.yaml
.taskfiles/User/app2
.taskfiles/User/app2/Taskfile.yaml
.taskfiles/User/Taskfile.yaml

$ cat .taskfiles/User/Taskfile.yaml
version: '3'
includes:
  app1: app1
  app2:
    taskfile: app2
 
$ cat .taskfiles/User/app1/Taskfile.yaml
version: '3'
tasks:
  greet1:
    cmds:
      - echo app1
    desc: test2

$ cat .taskfiles/User/app2/Taskfile.yaml
version: '3'
tasks:
  greet2:
    cmds:
      - echo app2
    desc: test2

$ task | grep "^task\|user"
task: [default] task -l
task: Available tasks for this project:
* user:app1:greet1:                test1
* user:app2:greet2:                test2

@onedr0p onedr0p merged commit 54259b4 into onedr0p:main Mar 1, 2024
4 checks passed
@wasurerarenai wasurerarenai deleted the Wasurerarenai-user-tasks branch March 28, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants