Introduces shards run, similar to shards build, that builds and runs the specified target, providing a unified interface to developers.
With this, a developer can directly use shards run <target> in a single step without having first to compile (build) and then execute it with ./bin/target. No need for a script or wrapper.
This is inspired by crystal build and crystal run user experience (with the difference that crystal run creates a temporary binary).
This is very helpful for automatic rebuild scenarios, where a process is monitoring your code and can rebuild and relaunch your application.
When invoking shards run, it will first build the target (with the supplied options) and then invoke it, passing the extra options:
$ shards run myapp --stats -- --args
Is the same as:
$ shards build myapp --stats
$ ./bin/myapp --args
If the target exits with error, the exit code is passed back.
This builds on top of the great work done by @denolfe in #298 and aims to resolve #157 initial set of requests.
Sending this out for review and possible address the other points left out in the original PR.
Introduces
shards run
, similar toshards build
, that builds and runs the specified target, providing a unified interface to developers.With this, a developer can directly use
shards run <target>
in a single step without having first to compile (build) and then execute it with./bin/target
. No need for a script or wrapper.This is inspired by
crystal build
andcrystal run
user experience (with the difference thatcrystal run
creates a temporary binary).This is very helpful for automatic rebuild scenarios, where a process is monitoring your code and can rebuild and relaunch your application.
When invoking
shards run
, it will first build the target (with the supplied options) and then invoke it, passing the extra options:Is the same as:
If the target exits with error, the exit code is passed back.
This builds on top of the great work done by @denolfe in #298 and aims to resolve #157 initial set of requests.
Sending this out for review and possible address the other points left out in the original PR.
Thank you. ❤️ ❤️ ❤️