1
1
mirror of https://github.com/casey/just.git synced 2024-11-22 18:34:06 +03:00

Add an example of using a variable in a recipe parameter (#1311)

This commit is contained in:
Michael Zeller 2022-08-16 14:25:10 -04:00 committed by GitHub
parent aed7ca1678
commit 35fb61af89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1441,6 +1441,18 @@ build target:
cd {{target}} && make
```
Variables can also be passed as arguments to dependencies:
```make
target := "main"
_build version:
@echo 'Building {{version}}…'
cd {{version}} && make
build: (_build target)
```
A command's arguments can be passed to dependency by putting the dependency in parentheses along with the arguments:
```make