]> jfr.im git - uguu.git/blobdiff - Makefile
Add make target to exec ansible role
[uguu.git] / Makefile
index b8e98f45a441333bfa72443ca6967ef12c6705c3..a20f8b53dd62abbae8ae057f3f45610636850e91 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ NPM="npm"
 DESTDIR="./dist"
 PKG_VERSION := $( $(GREP) -Po '(?<="version": ")[^"]*' )
 TMPDIR := $(shell mktemp -d)
+HOSTS_FILE = $(HOSTS_FILE)
 # default modules
 MODULES="php"
 
@@ -24,6 +25,7 @@ htmlmin:
 
 installdirs:
        mkdir -p $(DESTDIR)/ $(DESTDIR)/img
+       mkdir -p $(DESTDIR)/ $(DESTDIR)/img/grills
 ifneq (,$(findstring php,$(MODULES)))
        mkdir -p $(DESTDIR)/includes
 endif
@@ -42,6 +44,7 @@ min-js:
 
 copy-img:
        cp -v $(CURDIR)/static/img/*.png $(CURDIR)/build/img/
+       cp -R $(CURDIR)/static/img/grills $(CURDIR)/build/img/
 
 copy-php:
 ifneq ($(wildcard $(CURDIR)/static/php/.),)
@@ -60,6 +63,12 @@ endif
 install: installdirs
        cp -rv $(CURDIR)/build/* $(DESTDIR)/
 
+submodule-update:
+       git submodule update
+
+deploy:
+       ansible-playbook -i $(HOSTS_FILE) ansible/site.yml
+
 dist:
        DESTDIR=$(TMPDIR)/uguu-$(PKGVERSION)
        export DESTDIR