Skip to content

Commit

Permalink
Allow @define after goals #95 : README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jan 11, 2022
1 parent 11ae70a commit b8ccbc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ By default `makesure` logs the goals being executed. Use this option if this is

### @define

Only valid: in prelude.

Use this directive to declare global variable (visible to all goals).
The variable will be declared as environment variable (via `export`).

Expand All @@ -183,6 +181,10 @@ Example:
@define B="${A} world"
```

This directive is valid [in any place](tests/24_define_everywhere.sh) in `Makesurefile`. However, we recommend:
- place frequently changed variables (like versions) to the top of `Makesurefile`
- place infrequently changed variables closer to the goals/libs that use them

Variable defined with `@define` can be overridden with a variable passed in invocation via `-D` parameter.

Overall the precedence for variables resolution is (higher priority top):
Expand Down

0 comments on commit b8ccbc4

Please sign in to comment.