From f573b1b78e64f843015738a54d3fe2064489b138 Mon Sep 17 00:00:00 2001 From: Silumesii Maboshe Date: Tue, 23 Apr 2024 14:45:46 +0200 Subject: [PATCH] Use `bin/dev` to start the application Previously, we used `foreman start` to start the local application server. This did not give us a smooth experience if `foreman` was not already installed. This commit adds `bin/dev` to start the local application. `bin/dev` has become a convention. The script checks for `foreman` and installs it if it is not already available. --- README.md | 4 ++-- bin/dev | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 bin/dev diff --git a/README.md b/README.md index 6c8bca90e..16779ead0 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ your work. % bin/setup -3. Start Foreman. +3. Start the application. - % foreman start + % bin/dev 4. Verify that the app is up and running. diff --git a/bin/dev b/bin/dev new file mode 100755 index 000000000..e487832ef --- /dev/null +++ b/bin/dev @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if ! foreman version &> /dev/null +then + echo "Installing foreman..." + gem install foreman +fi + +foreman start