moonfire-nvr/docker/build-ui.bash
Scott Lamb 64cfd6ed44 dockerfile tweaks
Most importantly, in build-ui.bash, fix an extra "&&". This meant
that if the build command fails, it would proceed and cause confusion.
This happened for me: I ran it without the emulation installed. Both
the build-server and deploy stages had problems, but because of the "&&"
the deploy target didn't actually return failure. After I fixed the
emulation problem, there was a bad cached layer.

Also save the build output from the dev stage.
2021-03-27 21:35:44 -07:00

23 lines
591 B
Bash
Executable File

#!/bin/bash
# This file is part of Moonfire NVR, a security camera network video recorder.
# Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt.
# SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception.
# Build the "build-ui" target. See Dockerfile.
set -o errexit
set -o pipefail
set -o xtrace
mkdir /docker-build-debug/build-ui
exec > >(tee -i /docker-build-debug/build-ui/output) 2>&1
date
uname -a
time npm ci
time npm run build
ls -laFR /var/lib/moonfire-nvr/src/ui/node_modules \
> /docker-build-debug/build-ui/node_modules-after
date