Make sentry support play wav file when build success/failed, Can anyone help on try it on macOS?

Usage:

  1. clone code from GitHub - zw963/sentry: Build/Runs your crystal application, watches files, and rebuilds/restarts app on file changes
  2. shards build --release
  3. Add ./bin or copy ./bin/sentry into PATH.
  4. you have to keep source folder leave there, because sentry need find wav files from there.

Sentry allows customization of the build and run commands, it doesn’t have to do it by default. I use a script to run sentry:

run_sentry () {
  ./sentry -w 'src/**/*.cr' -w 'views/**/*.ecr' -b "time shards build -s --error-trace $1" -r "bin/$1"
}

Then I run run_sentry $APP where $APP is an key in the targets object in the project’s shard.yml. You can add your sound player after the build command.

2 Likes