Change Hooks
To take an action when an environment changes, you can use envkey-source like this:
$ envkey-source -r ./on-change.shOr use the es alias:
$ es -r ./on-change.shNow every time the environment is updated, your on-change.sh script will be run with the new environment. The environment variable __ENVKEY_UPDATED will be set to a comma-delimited list of variables that changed in the latest update so you can take action based on what changed. The previous value of any variable that changed will also be set to __PREV_[VARIABLE_NAME].
Updated 6 months ago