From 4c41448b1ceb33cf3636f1e80422d029c100206a Mon Sep 17 00:00:00 2001 From: Matt Rude Date: Mon, 27 Jan 2020 23:46:37 +0000 Subject: Add Makefile --- Makefile | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ _config.yml | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..211e6ef --- /dev/null +++ b/Makefile @@ -0,0 +1,61 @@ +SHELL := /bin/bash +VENDOR_DIR = assets/vendor/ +BUNDLER := bundler +JEKYLL := jekyll +CURL := curl +GEM := gem +GIT := git + + +jQueryVer := `grep jquery-ver _config.yml |sed 's/"//g' |awk '{ print $$2 }'` +BoostrapVer := `grep bootstrap-ver _config.yml |sed 's/"//g' |awk '{ print $$2 }'` + +default: + @echo "" + @echo "This is the build script for Loki's Stories website's Jekyll source." + @echo "" + @echo "make check - Checks that Jekyll is ready to run, also runs the 'vendor' command that downloads needed vendor files." + @echo "" + @echo "make install" + @echo "" + @echo "make pull - Command to update via the git command (git install required)" + @echo "" + @echo "make vendor - Command to download the needed vendor files (jQuery, Bootstrap." + @echo "" + @echo "make update - Command to run 'git pull' then 'gem update' then 'bundler update'" + @echo "" + @echo "make build - Command ro run 'bundler exec jekyll build'" + @echo "" + @echo "make run - Command to run " + @echo "" + @echo "make publish" + +check: + @$(BUNDLER) exec $(JEKYLL) doctor + +clean: + @$(BUNDLER) exec $(JEKYLL) clean + @rm -rf assets/vendor + +install: + @$(BUNDLER) install + +pull: + @$(GIT) pull + +update: + @$(GIT) pull + @$(GEM) update + @$(BUNDLER) update + +build: + @$(BUNDLER) exec $(JEKYLL) build + +b: build + +publish: + @JEKYLL_ENV=production $(BUNDLER) exec $(JEKYLL) build --trace + +p: publish + +run: pull publish diff --git a/_config.yml b/_config.yml index 8de6915..0555ef5 100644 --- a/_config.yml +++ b/_config.yml @@ -26,7 +26,7 @@ exclude: plugins: - jekyll-responsive-image -#- jekyll-minifier +- jekyll-minifier #- jekyll-sitemap responsive_image: -- cgit v1.2.3-59-ga6da