Merge remote-tracking branch 'origin/feature/ui-build-version-messages' into bugfix/ui-release-version

This commit is contained in:
Matt Keeler 2018-06-26 10:17:21 -04:00
commit b3ced1fef1
2 changed files with 4 additions and 2 deletions

View File

@ -67,7 +67,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
@ -86,6 +86,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

View File

@ -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}"
@ -149,4 +150,4 @@ function main {
} }
main "$@" main "$@"
exit $? exit $?