-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document using functions in variable assignments (#2431)
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1292,19 +1292,19 @@ Available recipes: | |
|
||
### Variables and Substitution | ||
|
||
Variables, strings, concatenation, path joining, and substitution using `{{…}}` | ||
are supported: | ||
Variables, strings, concatenation, path joining, substitution using `{{…}}`, and function calls are supported: | ||
|
||
```just | ||
tmpdir := `mktemp -d` | ||
version := "0.2.7" | ||
tardir := tmpdir / "awesomesauce-" + version | ||
tarball := tardir + ".tar.gz" | ||
config := quote(config_dir() / ".project-config") | ||
publish: | ||
rm -f {{tarball}} | ||
mkdir {{tardir}} | ||
cp README.md *.c {{tardir}} | ||
cp README.md *.c {{ config }} {{tardir}} | ||
tar zcvf {{tarball}} {{tardir}} | ||
scp {{tarball}} [email protected]:release/ | ||
rm -rf {{tarball}} {{tardir}} | ||
|
@@ -1497,8 +1497,8 @@ Done! | |
|
||
### Functions | ||
|
||
`just` provides a few built-in functions that might be useful when writing | ||
recipes. | ||
`just` provides many built-in functions for use in expressions, including | ||
recipe body `{{…}}` substitutions, assignments, and default parameter values. | ||
|
||
All functions ending in `_directory` can be abbreviated to `_dir`. So | ||
`home_directory()` can also be written as `home_dir()`. In addition, | ||
|