commit d915151278708561b00444efe9cf737019dcccb5 (patch)
parent 14480732a8194c8e1fe54ef83e67c3838be276bd
Author: Alex Karle <alex@karle.co>
Date: Wed, 13 May 2020 21:30:58 -0400
make: Remove build.sh script in favor of make recipe
It was really only doing one lines worth of work!
To document for future-me what's going on here, we're using
MOJO_WEBPACK_BUILD=1 to force trigger a build and using the routes
action to effectively no-op (start and stop the server). It works
perfectly for a "build and shutdown"
Diffstat:
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
@@ -19,11 +19,12 @@ test:
# We make this timestamp file the dependency for build to
# ensure we don't do it too often...
.public.ts: $(PUBLIC_FILES)
- ./build.sh
+ env MOJO_WEBPACK_VERBOSE=1 MOJO_WEBPACK_BUILD=1 ./gloat.pl routes
touch .public.ts
# Only rebuild if any of public/ or the Perl stuff has changed
build: .public.ts $(LIB_FILES) gloat.pl
+ rm -rf build
mkdir -p build
cp -a gloat.pl public lib build
@echo ">>> Build Success! <<<"
diff --git a/build.sh b/build.sh
@@ -1,17 +0,0 @@
-#!/bin/sh
-# build.sh -- build webpack assets
-set -e
-die() {
- echo "$1" 1>&2
- exit 1
-}
-
-[ -e "gloat.pl" ] || die "Must be in root of euchre-live"
-
-# Set env vars to force a production build
-# export MOJO_MODE=${MOJO_MODE:="production"} # TODO: use in server
-export MOJO_WEBPACK_VERBOSE=1
-export MOJO_WEBPACK_BUILD=1
-
-# Run an effectively no-op (non daemonizing) command to kick it off
-./gloat.pl routes