From 4186f9f13d1548cab99cefe5ca096a0cb49dbaa1 Mon Sep 17 00:00:00 2001 From: Kit Date: Fri, 13 Oct 2023 11:46:49 -0400 Subject: [PATCH] Resolving issues from review --- .tugboat/config.yml | 2 ++ composer.json | 10 +++++----- scripts/next-build.sh | 3 +-- scripts/next-start.sh | 10 ++++++++++ 4 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 scripts/next-start.sh diff --git a/.tugboat/config.yml b/.tugboat/config.yml index c1722fd180..c61e7bb01b 100644 --- a/.tugboat/config.yml +++ b/.tugboat/config.yml @@ -232,6 +232,8 @@ services: # Build storybook and the frontends in parallel - bash -lc 'time task --taskfile=tugboat.yml' + # Build next build server + - bash -lc 'composer va:next:start' memcache: image: tugboatqa/memcached:1.6 diff --git a/composer.json b/composer.json index 7f8e592ad2..0c2f148798 100644 --- a/composer.json +++ b/composer.json @@ -574,7 +574,7 @@ "va:web:build": "Perform a content build.", "va:web:install": "Prepare the content-build project.", "va:web:prepare-dotenv": "Prepare the ./web/.env file.", - "va:next-preview": "Prepare the next preview server" + "va:next-preview": "Prepare the next preview server" }, "scripts": { "pre-install-cmd": [ @@ -821,19 +821,19 @@ "! ./scripts/should-run-directly.sh || ./scripts/web-prepare-dotenv.sh", "./scripts/should-run-directly.sh || ddev composer va:web:prepare-dotenv --" ], - "va:next:install": [ + "va:next:install": [ "# Prepare the next build project", - "! ./scripts/should-run-directly.sh || ./scripts/next-install.sh", + "! ./scripts/should-run-directly.sh || ./scripts/next-install.sh", "./scripts/should-run-directly.sh || ddev composer va:next:install --" ], "va:next:build": [ "# Prepare the next build server", - "! ./scripts/should-run-directly.sh || ./scripts/next-build.sh", + "! ./scripts/should-run-directly.sh || ./scripts/next-build.sh", "./scripts/should-run-directly.sh || ddev composer va:next:build --" ], "va:next:start": [ "# Start the next build server", - "! ./scripts/should-run-directly.sh || yarn start", + "! ./scripts/should-run-directly.sh || next-start.sh", "./scripts/should-run-directly.sh || ddev composer va:next:start--" ] } diff --git a/scripts/next-build.sh b/scripts/next-build.sh index c27c91eea0..ff134cf6fe 100755 --- a/scripts/next-build.sh +++ b/scripts/next-build.sh @@ -8,5 +8,4 @@ source ~/.bashrc cd next -APP_ENV=tugboat yarn build:preview -yarn next:start \ No newline at end of file +APP_ENV=tugboat yarn build:preview \ No newline at end of file diff --git a/scripts/next-start.sh b/scripts/next-start.sh new file mode 100644 index 0000000000..257f3d24a4 --- /dev/null +++ b/scripts/next-start.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" +source ~/.bashrc + +cd next + +APP_ENV=tugboat yarn start \ No newline at end of file