2021-01-06 18:37:21 +00:00
|
|
|
.PHONY: clean dist dist-docker dist-netlify test-workspace
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Build a distribution of the UI using the minimal amount of dependencies
|
|
|
|
dist: clean
|
|
|
|
cd packages/consul-ui && \
|
|
|
|
CONSUL_UI_INSTALL_FLAGS=--focus \
|
|
|
|
$(MAKE)
|
|
|
|
|
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
|
|
|
|
# Build Command: make dist-netlify
|
|
|
|
# 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
|