From c8e89464d8257611add40edc33a5db8559a7dfa1 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 5 Aug 2024 03:03:36 +0000 Subject: automatic import of grafana --- build_frontend.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build_frontend.sh (limited to 'build_frontend.sh') diff --git a/build_frontend.sh b/build_frontend.sh new file mode 100755 index 0000000..1117e80 --- /dev/null +++ b/build_frontend.sh @@ -0,0 +1,20 @@ +#!/bin/bash -eu + +# Webpack needs more than the default 4GB RAM +export NODE_OPTIONS="${NODE_OPTIONS:-} --max_old_space_size=6144" + +# Build the frontend +yarn run build + +# Build the bundled plugins +mkdir plugins-bundled/external +yarn run plugins:build-bundled +for plugin in plugins-bundled/internal/input-datasource; do + mv $plugin $plugin.tmp + mv $plugin.tmp/dist $plugin + rm -rf $plugin.tmp +done +rm plugins-bundled/README.md plugins-bundled/.gitignore plugins-bundled/external.json + +# Fix permissions (webpack sometimes outputs files with mode = 666 due to reasons unknown (race condition/umask issue afaics)) +chmod -R g-w,o-w public/build plugins-bundled -- cgit v1.2.3