Comments (7)
Taskfile_{{.GOOS}}.yml
should be very simple.
About interpolation with same-context variables, I don't how to implement that. Maybe a list as @smyrman suggested, but seems a bit counter-intuitive to the user.
from task.
I agree with this proposal.
It also optionally allows for later features, like allowing an "env" section to be passed in (not suggesting that we do that now), or allowing shell commands as dependencies.
from task.
If the following Taskvars.yaml would save me a lot of boilerplate:
VAR1: hello
VAR2: {{.VAR1}} world #<- VAR2 would be hello world
This is probably not easly possible.
Also: Taskvars_{GOOS}.yaml
would be cool to overwrite dynamic variables.
from task.
@zbindenren, I don't see that as relevant to this issue. You can create a new issue for it perhaps, but as you say, it's not really easily possible to do this in a deterministic way.
Issue #40 is more closely related to what you ask.
UPDATE: I guess it's somewhat related, in that while changing the syntax anyway, if variables where changed to be a list of objects, then it would be possible.
vars:
- VAR1: hello
- VAR2: "{{.VAR1}} world"
- {VAR3: "hey", VAR4: "{{.VAR1}} there"} # Also possible, but here VAR4 may not use VAR3...
But probably still best discussed in a new issue.
from task.
Maybe a list as @smyrman suggested, but seems a bit counter-intuitive to the user.
I agree to that. It's not a good solution.
from task.
@zbindenren Taskvars_{{GOOS}}.yml
should be working on master branch.
from task.
Great thx :-)
from task.
Related Issues (20)
- Dynamic vars with tasks
- Add ability to manipulate files HOT 1
- Add ability to register output of a task and make it available in templates context HOT 1
- task requires vars doesnt exit if var is not there HOT 2
- arbitrarily override `silent: true` on the root of the taskfile.
- After the v3.32.0 release, variable propagation to environment variables fails. HOT 1
- Dynamic variables of task are evaluated before preconditions
- Template variable containing absolute path to root taskfile HOT 1
- Feature Request: provide a bool variable to tasks that represents if the —offline flag is used
- schema.json is not valid HOT 1
- Feature Request: Add an option --list-included
- Schema for `defer_call` contains invalid JSON Schema, causing some schema validators to fail HOT 2
- Temporary folder (.task) is not exposed as a special variable HOT 1
- completion not working when using a variable as a `replace` argument
- Special var CLI_SILENT / CLI_VERBOSE HOT 1
- Allow `defer` to know if the task succeded or failed
- Cannot execute task for each item in a list HOT 1
- Regression: invisible trust prompt in 3.34.0 when using remote Taskfile HOT 3
- GOARCH incorrect on Mac M2 HOT 1
- Add ability to disable watch mode for task that has `watch: true` set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from task.