2021-01-25 19:02:45 +00:00
|
|
|
.PHONY: clean dist dist-docker dist-vercel test-workspace
|
2021-01-06 18:37:21 +00:00
|
|
|
|
2021-01-07 19:04:45 +00:00
|
|
|
# make is run with no target from the consul root Makefile ui target but from
|
|
|
|
# within docker during release, so that we keep that as the default target
|
|
|
|
.DEFAULT_GOAL := dist-docker
|
|
|
|
|
2021-01-06 18:37:21 +00:00
|
|
|
# Run from CI, should run any checks/tests for the workspace that we'd like to
|
|
|
|
# be run for every PR
|
|
|
|
test-workspace:
|
|
|
|
yarn run compliance
|
|
|
|
|
2020-10-21 14:23:16 +00:00
|
|
|
# Called from the build ui docker image
|
|
|
|
dist-docker: dist
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ./dist
|
|
|
|
|
2021-10-14 14:14:26 +00:00
|
|
|
# Build a distribution of the UI
|
2020-10-21 14:23:16 +00:00
|
|
|
dist: clean
|
|
|
|
cd packages/consul-ui && \
|
|
|
|
$(MAKE)
|
|
|
|
|
2021-10-14 14:14:26 +00:00
|
|
|
# Install deps for the UI only
|
|
|
|
deps: clean
|
|
|
|
cd packages/consul-ui && \
|
|
|
|
$(MAKE) deps
|
|
|
|
|
|
|
|
|
2021-01-25 18:46:20 +00:00
|
|
|
# Build a distribution of the UI for Vercel previews.
|
2020-10-21 14:23:16 +00:00
|
|
|
# The distribution must be copied into the ui/ subfolder
|
|
|
|
# in order to mirror the go binary
|
|
|
|
#
|
2021-01-25 18:46:20 +00:00
|
|
|
# Vercel Settings:
|
2020-10-21 14:23:16 +00:00
|
|
|
# ---
|
2021-01-25 18:46:20 +00:00
|
|
|
# Base Directory: ui
|
2021-01-25 19:02:45 +00:00
|
|
|
# Build Command: make dist-vercel
|
2021-01-25 18:46:20 +00:00
|
|
|
# Publish Directory: ui/dist
|
|
|
|
dist-vercel: clean
|
2020-10-21 14:23:16 +00:00
|
|
|
mkdir -p dist/ui && \
|
|
|
|
cd packages/consul-ui && \
|
|
|
|
CONSUL_UI_INSTALL_FLAGS=--focus \
|
|
|
|
$(MAKE) build-staging && \
|
2021-01-25 18:46:20 +00:00
|
|
|
mv dist/* ../../dist/ui
|