Files
threshold/scripts/uigen.sh
T
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00

27 lines
558 B
Bash
Executable File

#!/bin/sh
set -e
if [ -z "$UI_CLONE_DIR" ]; then
echo "Must set UI_CLONE_DIR"; exit 1
fi
if [ -z "$UI_ASSETS_FILE" ]; then
echo "Must set UI_ASSETS_FILE"; exit 1
fi
(
cd "$UI_CLONE_DIR"
if ! yarn install && yarn build; then
echo "Please ensure Node v14+ and Yarn v1.22.10+ are installed."
fi
)
uidir="${UI_CLONE_DIR}/ui/admin/dist"
go-bindata -fs -o "$UI_ASSETS_FILE.tmp" -pkg ui -prefix "${uidir}" "${uidir}" "${uidir}/assets"
printf "// +build ui\n" > "$UI_ASSETS_FILE"
cat "$UI_ASSETS_FILE.tmp" >> "$UI_ASSETS_FILE"
rm "$UI_ASSETS_FILE.tmp"