samueleaton / sentry

Build/Runs your crystal application, watches files, and rebuilds/restarts app on file changes
MIT License
286 stars 27 forks source link

build and run commands instead of command #40

Open KCErb opened 5 years ago

KCErb commented 5 years ago

Are you interested in allowing the user to pass in an array of commands instead of a single command for build and run?

There's a relative of this tool in Lucky that allows that and it's a must-have feature for my use case.

Related: https://github.com/luckyframework/lucky/issues/782

samueleaton commented 5 years ago

Hey @KCErb could you give an example?

KCErb commented 5 years ago
require "sentry"

sentry = Sentry::ProcessRunner.new(
    process_name: "My cool app",
    build_commands: ["crystal build ./src/my_app.cr", "do_something_else"]
    run_command: ["./script/prep_app", "./my_app"],
    files: ["./src/**/*.cr", "./src/**/*.ecr"]
)

sentry.run