From 48c0cd5b2aae16830149c3982b525eb75e03e8dc Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 20 Nov 2023 10:04:55 +0800 Subject: [PATCH] DEV: Always run bundle and yarn install while running `d/boot_dev` (#24453) Why this change? Before this change, running `d/boot_dev` does not run `bundle install` and `yarn install` unless the `--init` option is specified. However, this does not make sense because the user will end up having to run `d/bundle install` and `d/yarn install` manually after if the `--init` option is not used. We can simplify this by just always running `bundle install` and `yarn install` whenever `d/boot_dev` is used. What does this change do? This change changes the `d/boot_dev` script to always run `bundle install` and `yarn install`. --- bin/docker/boot_dev | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/docker/boot_dev b/bin/docker/boot_dev index 24e3521b017..151241b71fe 100755 --- a/bin/docker/boot_dev +++ b/bin/docker/boot_dev @@ -107,12 +107,6 @@ docker run -d \ discourse/discourse_dev:release /sbin/boot if [ "${initialize}" = "initialize" ]; then - echo "Installing gems..." - "${SCRIPTPATH}/bundle" install - - echo "Yarn install..." - "${SCRIPTPATH}/exec" yarn install --cwd app/assets/javascripts/discourse - echo "Migrating database..." "${SCRIPTPATH}/rake" db:migrate RAILS_ENV=test "${SCRIPTPATH}/rake" db:migrate @@ -120,3 +114,10 @@ if [ "${initialize}" = "initialize" ]; then echo "Creating admin user..." "${SCRIPTPATH}/rake" admin:create fi + +echo "Installing gems..." +"${SCRIPTPATH}/bundle" install + +echo "Yarn install..." +"${SCRIPTPATH}/exec" yarn install --cwd app/assets/javascripts/discourse +