Update ui build scripts to check edition (#3016)

This commit is contained in:
Zhihe Li authored and GitHub committed 2023-02-27 10:25:16 -05:00
1 parent 5e0957eb24
commit 4f37319c6f
3 files changed
+36 -18

No files matched your search

+11 -1
View File
@@ -8,12 +8,22 @@ set -e
if [ -z "$UI_VERSION_FILE" ]; then
echo "Must set UI_VERSION_FILE"; exit 1
fi
if [ -z "$UI_COMMITISH" ]; then
echo "Must set UI_COMMITISH"; exit 1
fi
UI_EDITION=$(make --no-print-directory edition)
if [ "$UI_EDITION" == "oss" ]; then
UI_REPO=https://github.com/hashicorp/boundary-ui
else
UI_VERSION_FILE="${UI_VERSION_FILE}_ent"
UI_REPO=https://github.com/hashicorp/boundary-ui-enterprise
fi
shafileabs="$(pwd)/${UI_VERSION_FILE}"
V="$(git ls-remote https://github.com/hashicorp/boundary-ui ${UI_COMMITISH})"
V="$(git ls-remote ${UI_REPO} ${UI_COMMITISH})"
if [ -z "$V" ]; then
V=$UI_COMMITISH;