Skip to content

Sources to support space seperated list of files #2201

@ameershira

Description

@ameershira

Description

This feature would allow taskfile to be easier and more intuative to use, and expland its use cases.

I would like to be able to use a space seperated list of files as a "sources" item.

Example 1: Simple.

  task1:
    cmds:
      - <do stuff with FILES>
    sources:
      - ./file1.c ./file2.c

AND

  task1:
    cmds:
      - <do stuff with FILES>
    sources:
      - |
        ./file1.c
        ./file2.c

Example 2: Support task input vars.

  task1:
    requires:
      vars: [FILES]
    cmds:
      - <do stuff with FILES>
    sources:
      - '{{.FILES}}'

And Called like:

  parent-task:
    vars:
       SRC_FILES:
         sh: ls ./src/*.c
    cmds:
      - task: task1
        vars: {
          FILES: {{.SRC_FILES}}
        }

This would also apply to the generates sections as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: fingerprintingChanges related to checksums and caching.state: wontfixThe issue will not be progressed or fixed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions