chore: Update Digital Team Files (#32037)

* Update generated scripts (website-start.sh)

* Update generated website Makefile

* Update generated scripts (should-build.sh)

* Update generated scripts (website-build.sh)

* chore: update root `Makefile`

Co-authored-by: Kevin Wang <kwangsan@gmail.com>
This commit is contained in:
HashiBot
2022-10-20 13:04:57 -05:00
committed by GitHub
parent 03e262a70b
commit 54de574e2b
5 changed files with 156 additions and 46 deletions

View File

@@ -1,21 +1,3 @@
WEBSITE_REPO=github.com/hashicorp/terraform-website
VERSION?="0.3.44"
PWD=$$(pwd)
DOCKER_IMAGE="hashicorp/terraform-website:full"
DOCKER_IMAGE_LOCAL="hashicorp-terraform-website-local"
DOCKER_RUN_FLAGS=--interactive \
--rm \
--tty \
--workdir "/website" \
--volume "$(shell pwd):/website/ext/terraform" \
--volume "$(shell pwd)/website:/website/preview" \
--publish "3000:3000" \
-e "IS_CONTENT_PREVIEW=true" \
-e "PREVIEW_FROM_REPO=terraform" \
-e "NAV_DATA_DIRNAME=./preview/data" \
-e "CONTENT_DIRNAME=./preview/docs" \
-e "CURRENT_GIT_BRANCH=$$(git rev-parse --abbrev-ref HEAD)"
# generate runs `go generate` to build the dynamically generated
# source files, except the protobuf stubs which are built instead with
# "make protobuf".
@@ -44,26 +26,21 @@ staticcheck:
exhaustive:
"$(CURDIR)/scripts/exhaustive.sh"
# Default: run this if working on the website locally to run in watch mode.
# Run this if working on the website locally to run in watch mode.
website:
@echo "==> Downloading latest Docker image..."
@docker pull ${DOCKER_IMAGE}
@echo "==> Starting website in Docker..."
@docker run ${DOCKER_RUN_FLAGS} ${DOCKER_IMAGE} npm start
$(MAKE) -C website website
# Use this if you have run `website/build-local` to use the locally built image.
website/local:
@echo "==> Starting website in Docker..."
@docker run ${DOCKER_RUN_FLAGS} ${DOCKER_IMAGE_LOCAL} npm start
$(MAKE) -C website website/local
.PHONY: website/build-local
# Run this to generate a new local Docker image.
website/build-local:
@echo "==> Building local Docker image"
@docker build https://github.com/hashicorp/terraform-website.git\#master \
-t $(DOCKER_IMAGE_LOCAL)
$(MAKE) -C website website/build-local
# disallow any parallelism (-j) for Make. This is necessary since some
# commands during the build process create temporary files that collide
# under parallel conditions.
.NOTPARALLEL:
.PHONY: fmtcheck importscheck generate protobuf website website-test staticcheck website/local website/build-local
.PHONY: fmtcheck importscheck generate protobuf staticcheck website website/local website/build-local