#observe #dependencies #cli

app depon

Execute subsequent command only if given dependencies changed

2 releases

0.1.1 Dec 16, 2022
0.1.0 Dec 16, 2022

#1122 in #cli

MIT/Apache

7KB
94 lines

depon - "depends on"

Prevent execution of a subsequent command on the cli if the given dependency did not change.

Usage: depon [OBSERVE]...

Arguments:
  [OBSERVE]...

Options:
  -h, --help  Print help information

Usage

> depon ./tasks.json && ./upload.sh ./tasks.json

The ./upload.sh ./task.json part of this invocation will be executed if depon detects, that ./task.json has been modified. If it does not have been modified, depon will prevent further execution.

Install

cargo install depon

How does it Work?

If depon detects a change in given dependencies or the dependencies have been touched, depon will exit with an error exit code, thereby preventing further execution of linked commands with the && shell operator. Depon keeps track of the dependencies between calls persistently in a ./depon.lock file.

Dependencies

~5MB
~100K SLoC