forked from go-task/task
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Enable the re-evaluation of dotenv files (global/task) if the file changes. Supports this method:
version: '3'
dotenv:
- cred.env
tasks:
login:
run: always
cmds:
- echo "FOO=foo" > cred.env
doit:
deps:
- login
cmds:
- echo foo=$FOO # foo=foo
- echo foo={{.FOO}} # foo=foo
- echo "FOO=bar" > cred.env
- echo foo=$FOO # foo=bar
- echo foo={{.FOO}} # foo=bar
General refactoring tasks:
- templater saved as member of Task (compiledTask)
- cmd's are expanded just before being run (i.e. in runCommand)
- keep track of envar files, rebuild templater if changed
- create function to cleanly generate a templater object (decouple from existing code)
Possibly, the vars code can keep track of dotenv files. Create a type to do that efficiently.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request