mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Allow building the supervisor source without optimizations for easier debugging with dindctl
Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
babee8667e
commit
f5f8ca6df2
13
dindctl
13
dindctl
@ -46,6 +46,7 @@ SUPERVISOR_EXTRA_MOUNTS=""
|
||||
DIST_MOUNTED="false"
|
||||
DIND_IMAGE="resin-supervisor-dind"
|
||||
PRELOADED_IMAGE=""
|
||||
OPTIMIZE="true"
|
||||
|
||||
function showHelp {
|
||||
cat $THIS_FILE | awk '{if(/^#/)print;else exit}' | tail -n +2 | sed 's/\#//' | sed 's|dindctl|'$THIS_FILE'|'
|
||||
@ -80,6 +81,9 @@ function parseOptions {
|
||||
ARCH="$2"
|
||||
shift || { echo "--arch provided not specified" && exit 1; }
|
||||
;;
|
||||
--no-optimize)
|
||||
OPTIMIZE="false"
|
||||
;;
|
||||
*)
|
||||
echo "Warning: unknown argument: $arg"
|
||||
;;
|
||||
@ -97,8 +101,13 @@ function buildSupervisor {
|
||||
}
|
||||
|
||||
function buildSupervisorSrc {
|
||||
echo "Rebuilding supervisor source"
|
||||
( cd "$SUPERVISOR_BASE_DIR" && npm install && npm run build )
|
||||
if [ "$OPTIMIZE" = "true" ]; then
|
||||
echo "Rebuilding supervisor source"
|
||||
( cd "$SUPERVISOR_BASE_DIR" && npm install && npm run build )
|
||||
else
|
||||
echo "Rebuilding supervisor source without optimizations"
|
||||
( cd "$SUPERVISOR_BASE_DIR" && npm install && npm run build-no-optimize )
|
||||
fi
|
||||
}
|
||||
|
||||
function refreshSupervisorSrc {
|
||||
|
@ -10,6 +10,7 @@
|
||||
"scripts": {
|
||||
"start": "./entry.sh",
|
||||
"build": "webpack --optimize-minimize",
|
||||
"build-no-optimize": "webpack",
|
||||
"lint": "resin-lint src/",
|
||||
"versionist": "versionist"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user