diff --git a/README.md b/README.md index eeb3aff..e3f1ccd 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Build/Runs your crystal application, watches files, and rebuilds/reruns app on f ## Installation +### Installation using ruby script + To install in your project, from the root directory of your project, run: ```bash curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/install.rb | ruby @@ -23,6 +25,32 @@ This will install the Sentry CLI tool. To use the Crystal API, see [CRYSTAL_API. **Troubleshooting the install:** This ruby install script is just a convenience. If it does not work, simply: (1) place the files located in the `src` dir into a your project in a `dev/` dir, and (2) compile sentry by doing `crystal build --release dev/sentry_cli.cr -o ./sentry`. + +### Installation using shard.yml and Makefile + +Add Sentry to your `shard.yml`'s `development_dependencies` section: + +```yml +development_dependencies: + sentry: + github: samueleaton/sentry +``` + +And add following instructions to your `Makefile`: + +```Makefile +sentry: ./lib/sentry/src/sentry_cli.cr + mkdir -p ./bin/ + crystal build --release ./lib/sentry/src/sentry_cli.cr -o ./bin/sentry + @echo "Sentry is compiled to ./bin/sentry" +``` + +Install shards using command `$ shards install`, which downloads sentry under directory `./lib/sentry/`. And now you can compile sentry `$ make sentry`. It creates runnable binary `./bin/sentry` that can be used as following: + +```bash +./bin/sentry [options] +``` + ## Usage Assuming `sentry.cr` was correctly placed in `[your project name]/dev/sentry.cr` and compiled into the root of your app as `sentry`, simply run: