diff options
author | Santiago Soler <santiago.r.soler@gmail.com> | 2021-03-27 15:53:32 -0300 |
---|---|---|
committer | Santiago Soler <santiago.r.soler@gmail.com> | 2021-03-27 15:53:32 -0300 |
commit | 6b08841829c2f2fabce595f54f9437f841fd8737 (patch) | |
tree | 38b4f85acb79a4ac81360028ee2017ae6d1940d8 | |
parent | 89ad11d48c9da61cbc9140ed9b52709e66a66583 (diff) | |
download | website-6b08841829c2f2fabce595f54f9437f841fd8737.tar.gz |
Improve Makefile
-rw-r--r-- | Makefile | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -1,13 +1,22 @@ # Construye tu sitio web en texto-plano con Jekyll -# -# Para usar este makefile desde texto-plano.xyz corre make modificando el -# comando del compilador: -# -# make JEKYLL=jekyll26 +# ------------------------------------------------ +BUILD_DIR = _site +DEPLOY_DIR = $(HOME)/public_html +RSYNC = rsync +RSYNC_ARGS = -av -JEKYLL := bundle exec jekyll +# Determina qué comando utilizar para llamar a jekyll +ifeq (, $(shell which jekyll26 2> /dev/null)) + JEKYLL = bundle exec jekyll +else + JEKYLL = jekyll26 +endif -all: + + +all: build + +build: $(JEKYLL) build serve: @@ -15,3 +24,6 @@ serve: clean: $(JEKYLL) clean + +deploy: build $(DEPLOY_DIR) + $(RSYNC) $(RSYNC_ARGS) $(BUILD_DIR)/ $(DEPLOY_DIR) |