From 8e1516eeb7a0d2031b2a979150bf46f0fd88c2e1 Mon Sep 17 00:00:00 2001 From: Hao Liu Date: Wed, 16 Aug 2023 17:00:27 -0400 Subject: [PATCH] Update UI_NEXT build to set PRODUCT and PUBLIC_PATH https://github.com/ansible/ansible-ui/pull/792 added configurable public path (which was change to '/' in https://github.com/ansible/ansible-ui/pull/766/files#diff-2606df06d89b38ff979770f810c3c269083e7c0fbafb27aba7f9ea0297179828L128-R157) This PR added the variable when building ui-next --- awx/ui_next/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/Makefile b/awx/ui_next/Makefile index a3d0013d2b..68ba36ef56 100644 --- a/awx/ui_next/Makefile +++ b/awx/ui_next/Makefile @@ -5,10 +5,13 @@ UI_NEXT_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) # NOTE: you will not be able to build within the docker-compose development environment if you use this option UI_NEXT_LOCAL ?= -# Git repo and branch to the UI_NEXT repo +## Git repo and branch to the UI_NEXT repo UI_NEXT_GIT_REPO ?= https://github.com/ansible/ansible-ui.git UI_NEXT_GIT_BRANCH ?= main +## Product name to display on the UI used in UI_NEXT build process +PRODUCT ?= AWX + .PHONY: ui-next ## Default build target of ui-next Makefile, builds ui-next/build ui-next: ui-next/build @@ -32,7 +35,7 @@ ui-next/src/build: $(UI_NEXT_DIR)/src/build/awx ## True target for ui-next/src/build. Build ui_next from source. $(UI_NEXT_DIR)/src/build/awx: $(UI_NEXT_DIR)/src $(UI_NEXT_DIR)/src/node_modules/webpack @echo "=== Building ui_next ===" - @cd $(UI_NEXT_DIR)/src && npm run build:awx + @cd $(UI_NEXT_DIR)/src && PRODUCT=$(PRODUCT) PUBLIC_PATH=/static/awx npm run build:awx .PHONY: ui-next/src ## Clone or link src of UI_NEXT to ui-next/src, will re-clone/link/update if necessary.