2021-05-20 14:57:43 +00:00
|
|
|
#!/bin/bash -eu
|
2020-11-04 16:44:15 +00:00
|
|
|
|
2022-09-07 11:51:55 +00:00
|
|
|
# Webpack needs more than the default 4GB RAM
|
|
|
|
export NODE_OPTIONS="${NODE_OPTIONS:-} --max_old_space_size=6144"
|
2022-09-06 15:43:22 +00:00
|
|
|
|
2020-11-04 16:44:15 +00:00
|
|
|
# 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
|