Skip to content

Feature request: Already-done check #156

@pjz

Description

@pjz

I think xc would be more useful if you could specify an 'is this already done?' kind of check. Call it 'when'. So:

### build
Build the xc binary
When:
```
for f in cmd/xc/* ; do
  if [ $f -nt ./xc ]; then
    exit 0
  fi
exit 1
```
Requires: tests
```
go build ./cmd/xc
```

So that the requires and build blocks will only execute if the 'when' block returns true (aka exit 0). The internal default when block could be /bin/true or the like. This feature would allow for more efficient task execution, as detection of already-executed steps would be possible.

It could be spelled either when as above, or if you'd rather check for the negative, unless might work better. Or perhaps support both, for best readability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions