summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-24 11:03:14 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-24 11:03:14 +0100
commit1499569abc3e8440592add96f96e01791282a246 (patch)
tree2aa47d6bf891c67d97c7b2c60844e4c87d5cb695 /Makefile
parentbefb10519daefcbee85950a4e574678fe4b7f402 (diff)
Optimized/Reduced packaging time
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index dd5294c..1fc5558 100644
--- a/Makefile
+++ b/Makefile
@@ -132,13 +132,21 @@ distclean: clean
cd $(ROOT_SRCDIR) && rm -rf $(LOCAL_BINDIR) ./tools ./glide.lock ./vendor ./*.zip ./webapp/node_modules ./webapp/dist
webapp: webapp/install
+ifneq ($(SKIP_WEBAPP_BUILD), true)
cd webapp && npm run $(WEBAPP_BUILD_RULE)
+else
+ @echo "Skipping webapp build (SKIP_WEBAPP_BUILD var is set)"
+endif
webapp/debug:
cd webapp && npm run watch
webapp/install:
+ifneq ($(SKIP_WEBAPP_BUILD), true)
(cd webapp && npm install)
+else
+ @echo "Skipping webapp install (SKIP_WEBAPP_BUILD var is set)"
+endif
@if [ -d ${DESTDIR}/usr/local/etc ]; then rm -rf ${DESTDIR}/usr; fi
.PHONY: install
@@ -167,9 +175,9 @@ package-all:
@echo "# Build linux amd64..."
GOOS=linux GOARCH=amd64 RELEASE=1 make -f $(ROOT_SRCDIR)/Makefile package
@echo "# Build windows amd64..."
- GOOS=windows GOARCH=amd64 RELEASE=1 make -f $(ROOT_SRCDIR)/Makefile package
+ GOOS=windows GOARCH=amd64 RELEASE=1 SKIP_WEBAPP_BUILD=true make -f $(ROOT_SRCDIR)/Makefile package
@echo "# Build darwin amd64..."
- GOOS=darwin GOARCH=amd64 RELEASE=1 make -f $(ROOT_SRCDIR)/Makefile package
+ GOOS=darwin GOARCH=amd64 RELEASE=1 SKIP_WEBAPP_BUILD=true make -f $(ROOT_SRCDIR)/Makefile package
make -f $(ROOT_SRCDIR)/Makefile clean
vendor: tools/glide glide.yaml