Skip to content

Commit

Permalink
don't install foreman using bin/dev, as overmind is now available as …
Browse files Browse the repository at this point in the history
…gem too
  • Loading branch information
toy committed Jun 24, 2024
1 parent dceff13 commit 131e536
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
15 changes: 4 additions & 11 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
#!/usr/bin/env bash

function fallback_to_foreman() {
echo 'Overmind not installed. Falling back to foreman...'
if ! command -v foreman &> /dev/null; then
echo 'Installing foreman...'
gem install foreman
fi

foreman start -f Procfile.dev
}

if command -v overmind &> /dev/null; then
overmind start -f Procfile.dev
elif command -v foreman &> /dev/null; then
foreman start -f Procfile.dev
else
fallback_to_foreman
echo 'Neither overmind, nor foreman is installed, either `gem install overmind` or `gem install foreman`.'
exit 1
fi
5 changes: 2 additions & 3 deletions docs/development/development-environment-osx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,8 @@ RAILS_ENV=development bin/rails db:seed
You can run all required workers of OpenProject through `overmind`, which combines them in a single tab. Optionally, you
may also
run `overmind` as a daemon and connect to services individually.
The `bin/dev` command will first check if `overmind` is available and run the application if via `Procfile.dev` if
possible. If not,
it falls back to `foreman`, installing it if needed.
The `bin/dev` command will first check if `overmind` is available and run the application via `Procfile.dev`. Otherwise
it will use `foreman` if it is available.

```shell
bin/dev
Expand Down
5 changes: 2 additions & 3 deletions docs/development/development-environment-ubuntu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ RAILS_ENV=development bin/rails db:seed
You can run all required workers of OpenProject through `overmind`, which combines them in a single tab. Optionally, you
may also
run `overmind` as a daemon and connect to services individually.
The `bin/dev` command will first check if `overmind` is available and run the application if via `Procfile.dev` if
possible. If not,
it falls back to `foreman`, installing it if needed.
The `bin/dev` command will first check if `overmind` is available and run the application via `Procfile.dev`. Otherwise
it will use `foreman` if it is available.

```shell
bin/dev
Expand Down

0 comments on commit 131e536

Please sign in to comment.