aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cee4d9e..f0eea16 100644
--- a/Makefile
+++ b/Makefile
@@ -18,15 +18,33 @@ deps: ruby
npm:
npm install
-.PHONY: all-deps
-all-deps: deps npm
-
jekyll := bundle exec jekyll
.PHONY: build
build:
$(jekyll) build
+.PHONY: maintenance
+maintenance: ruby npm
+ bundle update
+ npm update
+ @$(MAKE) bundle
+
+ @git_status="$$( git status --porcelain=v1 )" && \
+ if [ -z "$$git_status" ]; then \
+ true ; \
+ elif [ "$$git_status" = $$' M Gemfile.lock\n M package-lock.json' ] \
+ || [ "$$git_status" = $$' M Gemfile.lock\n M package-lock.json\n M assets/js/bundle.js' ]; then \
+ git commit -am 'bump dependencies' && \
+ git push -q ; \
+ else \
+ echo ; \
+ echo '-----------------------------------------------------------------'; \
+ echo 'Error: unrecognized modifications in the repository'; \
+ echo '-----------------------------------------------------------------'; \
+ exit 1; \
+ fi
+
.PHONY: serve
serve:
ifeq ($(LIVE_RELOAD),1)