mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 20:51:10 +00:00
Adds version messages both before and after the ui-v2 build
1. Prints the $version that you are passing through to the docker container 2. Prints the CONSUL_VERSION that is used in the UI v2 footer 3. Additionally added a `mkdir -p` so so `make ui-docker` runs with a clean exit if run in isolation
This commit is contained in:
parent
714ef5e43e
commit
1f978d860d
@ -61,7 +61,7 @@ function build_ui {
|
|||||||
# make sure we run within the ui dir
|
# make sure we run within the ui dir
|
||||||
pushd ${ui_dir} > /dev/null
|
pushd ${ui_dir} > /dev/null
|
||||||
|
|
||||||
status "Creating the UI Build Container with image: ${image_name}"
|
status "Creating the UI Build Container with image: ${image_name} and embedding as version ${version}"
|
||||||
local container_id=$(docker create -it -e "CONSUL_GIT_SHA=${commit_hash}" -e "CONSUL_VERSION=${version}" ${image_name})
|
local container_id=$(docker create -it -e "CONSUL_GIT_SHA=${commit_hash}" -e "CONSUL_VERSION=${version}" ${image_name})
|
||||||
local ret=$?
|
local ret=$?
|
||||||
if test $ret -eq 0
|
if test $ret -eq 0
|
||||||
@ -80,6 +80,7 @@ function build_ui {
|
|||||||
if test ${ret} -eq 0
|
if test ${ret} -eq 0
|
||||||
then
|
then
|
||||||
rm -rf ${1}/pkg/web_ui/v2
|
rm -rf ${1}/pkg/web_ui/v2
|
||||||
|
mkdir -p ${1}/pkg/web_ui
|
||||||
cp -r ${1}/ui-v2/dist ${1}/pkg/web_ui/v2
|
cp -r ${1}/ui-v2/dist ${1}/pkg/web_ui/v2
|
||||||
fi
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
@ -128,6 +128,7 @@ function main {
|
|||||||
fi
|
fi
|
||||||
status_stage "==> Building UI"
|
status_stage "==> Building UI"
|
||||||
build_ui "${sdir}" "${image}" || return 1
|
build_ui "${sdir}" "${image}" || return 1
|
||||||
|
status_stage "==> UI V2 Built with embedded version: $(cat ${sdir}/pkg/web_ui/v2/index.html | sed -n -e 's/.*CONSUL_VERSION%22%3A%22//p' | sed -n -e 's/%22%2C%22.*//p')"
|
||||||
;;
|
;;
|
||||||
ui-legacy )
|
ui-legacy )
|
||||||
if is_set "${refresh}"
|
if is_set "${refresh}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user