Skip to content

Dynamic .env file #434

@g5becks

Description

@g5becks

This may be possible already and I am unaware of it, but what I would like to be able to do is set the dotenv file based on an environment variable.
E.G.

version: "3"

env:
  NODE_ENV: echo $($NODE_ENV)

dotenv: ["./packages/server/.env.{{.NODE_ENV}}"]

This would enable more dynamic variables for my tasks as opposed to writing separate taskfiles and including them.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions