From f8068826aba1502b95ef8d11231c56fee6cda3bf Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 30 Sep 2020 17:26:07 -0700 Subject: [PATCH] Add script to build and bundle admin --- scripts/bundleAdmin.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/bundleAdmin.sh diff --git a/scripts/bundleAdmin.sh b/scripts/bundleAdmin.sh new file mode 100755 index 000000000..b5c06dc87 --- /dev/null +++ b/scripts/bundleAdmin.sh @@ -0,0 +1,13 @@ +PROJECT_SOURCE_DIR=$(pwd) +mkdir $TMPDIR/admin 2> /dev/null +cd $TMPDIR/admin +git clone --depth 1 https://github.com/owncast/owncast-admin 2> /dev/null +cd owncast-admin +npm --silent install 2> /dev/null +(node_modules/.bin/next build && node_modules/.bin/next export) | grep info +ADMIN_BUILD_DIR=$(pwd) +cd $PROJECT_SOURCE_DIR +mkdir webroot/admin 2> /dev/null +cd webroot/admin +cp -R ${ADMIN_BUILD_DIR}/out/* . +rm -rf $TMPDIR/admin