From 27f6de3a6113ee7ccfb3cd7abcc5166480bb8e93 Mon Sep 17 00:00:00 2001 From: HashiBot <62622282+hashibot-web@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:31:02 -0500 Subject: [PATCH] Update generated scripts (website-start.sh) --- website/scripts/website-start.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/website/scripts/website-start.sh b/website/scripts/website-start.sh index 6b421b257..1f9ea8800 100755 --- a/website/scripts/website-start.sh +++ b/website/scripts/website-start.sh @@ -12,6 +12,13 @@ PRODUCT=packer # Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer` PREVIEW_MODE=io +# Get the git branch of the commit that triggered the deploy preview +# This will power remote image assets in local and deploy previews +CURRENT_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +# This is where content files live, relative to the website-preview dir. If omitted, "../content" will be used +LOCAL_CONTENT_DIR= + should_pull=true # Clone the dev-portal project, if needed @@ -29,4 +36,8 @@ if [ "$should_pull" = true ]; then fi # Run the dev-portal content-repo start script -REPO=$PRODUCT PREVIEW_MODE=$PREVIEW_MODE npm run start:local-preview \ No newline at end of file +REPO=$PRODUCT \ +PREVIEW_FROM_REPO=$PRODUCT \ +LOCAL_CONTENT_DIR=$LOCAL_CONTENT_DIR \ +CURRENT_GIT_BRANCH=$CURRENT_GIT_BRANCH \ +npm run start:local-preview \ No newline at end of file