Skip to content

Is it possible to extend the args? #800

Answered by sagiegurari
AurevoirXavier asked this question in Q&A
Discussion options

You must be logged in to vote

no. instead what you could do is templating via functions.
for example:

[tasks.build-general]
args = [
	"build",
	"--locked",
	"--release",
	"--no-default-features",
	"--features",
	"@@split(FEATURE_LIST, )",
]

[tasks.build-feature1]
extend = "build-general"
env = {"FEATURE_LIST" = "feature1"}

[tasks.build-feature1-and-feature2]
extend = "build-general"
env = {"FEATURE_LIST" = "feature1 feature2"}

more on split function:
https://github.com/sagiegurari/cargo-make#usage-functions-split

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AurevoirXavier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants