Skip to content

How to declare variables with multiple value and expend them properly? #1117

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

Closed
stephane-archer opened this issue Apr 11, 2023 · 1 comment
Closed

Comments

@stephane-archer
Copy link

version: '3'

vars:
  GOSRC: main.go module1/module1.go module2/module2.go

tasks:
  default:
    cmds:
      - go build 
    sources:
       - "{{.GOSRC}}"
    generates:
      - MyApp

I'm quite sure I use and declare the variable GOSRC not the right way

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Apr 11, 2023
@stephane-archer stephane-archer changed the title How to declare variable with multiple value and expend them properly? How to declare variables with multiple value and expend them properly? Apr 11, 2023
@pd93
Copy link
Member

pd93 commented Apr 12, 2023

Unfortunately, this is not currently possible. #948 tracks this functionality. Please feel free to upvote that issue so that we can prioritise accordingly.

In the meantime, you will need to manually define your list of files in the sources array:

version: '3'

tasks:
  default:
    cmds:
      - go build 
    sources:
       - main.go
       - module1/module1.go
       - module2/module2.go
    generates:
      - MyApp

Note that you are able to use globbing in sources if this helps?

@pd93 pd93 closed this as completed Apr 12, 2023
@task-bot task-bot removed the state: needs triage Waiting to be triaged by a maintainer. label Apr 12, 2023
@pd93 pd93 added the question label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants