Skip to content

Commit

Permalink
Update setup-scripts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers authored Sep 27, 2023
1 parent b798c07 commit e6b601d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion site/src/book/setup-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ capture-stderr = false

## Setting up rules

In configuration, you can create rules for when to use scripts on a per-profile basis. This is done via the `profile.<profile-name>.scripts` array. For example, you can set up a script that generates a database if tests from the `db-tests` package, or any packages that depend on it, are run. (This uses the `rdeps` [filter expression](filter-expressions.md) predicate):
In configuration, you can create rules for when to use scripts on a per-profile basis. This is done via the `profile.<profile-name>.scripts` array. For example, you can set up a script that generates a database if tests from the `db-tests` package, or any packages that depend on it, are run.

```toml
[[profile.default.scripts]]
filter = 'rdeps(db-tests)'
setup = 'db-generate'
```

(This example uses the `rdeps` [filter expression](filter-expressions.md) predicate.)

Setup scripts can also filter based on platform, using the rules listed in [Specifying platforms](specifying-platforms.md):

```toml
Expand Down

0 comments on commit e6b601d

Please sign in to comment.