File: build_react_app.sh

package info (click to toggle)
prometheus 2.24.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,576 kB
  • sloc: javascript: 2,471; yacc: 555; asm: 297; sh: 215; lex: 180; makefile: 157
file content (18 lines) | stat: -rwxr-xr-x 315 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
#
# Build React web UI.
# Run from repository root.
set -e
set -u

if ! [[ "$0" =~ "scripts/build_react_app.sh" ]]; then
	echo "must be run from repository root"
	exit 255
fi

cd web/ui/react-app

echo "building React app"
PUBLIC_URL=. yarn build
rm -rf ../static/react
mv build ../static/react