Move placeholder index_awx.html out of build dir

- move placeholder index_awx.html out of ui_next build dir
- copy index_awx.html to build dir during development bootstrap if UI_NEXT has not been build
This commit is contained in:
Hao Liu 2023-03-20 12:25:28 -04:00
parent f558957538
commit 8d47644659
3 changed files with 7 additions and 1 deletions

View File

@ -36,6 +36,7 @@ $(UI_NEXT_DIR)/src/build: ui-next/src ui-next/src/webpack
.PHONY: ui-next/src
ui-next/src: $(UI_NEXT_DIR)/src
# TODO: Rewrite this big bash script in a more readable way.
.PHONY: $(UI_NEXT_DIR)/src
## Real target for ui-next/src.
$(UI_NEXT_DIR)/src:

View File

@ -25,7 +25,12 @@ fi
# Make sure that the UI static file directory exists, Django complains otherwise.
mkdir -p /awx_devel/awx/ui/build/static
mkdir -p /awx_devel/awx/ui_next/build/awx
# Make sure that the UI_NEXT statifc file directory exists, if UI_NEXT is not built yet put a placeholder file in it.
if [ ! -d "/awx_devel/awx/ui_next/build/awx" ]; then
mkdir -p /awx_devel/awx/ui_next/build/awx
cp /awx_devel/awx/ui_next/placeholder_index_awx.html /awx_devel/awx/ui_next/build/awx/index_awx.html
fi
if output=$(awx-manage createsuperuser --noinput --username=admin --email=admin@localhost 2> /dev/null); then
echo $output