summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Soler <santiago.r.soler@gmail.com>2021-03-27 15:53:32 -0300
committerSantiago Soler <santiago.r.soler@gmail.com>2021-03-27 15:53:32 -0300
commit6b08841829c2f2fabce595f54f9437f841fd8737 (patch)
tree38b4f85acb79a4ac81360028ee2017ae6d1940d8
parent89ad11d48c9da61cbc9140ed9b52709e66a66583 (diff)
downloadwebsite-6b08841829c2f2fabce595f54f9437f841fd8737.tar.gz
Improve Makefile
-rw-r--r--Makefile26
1 files changed, 19 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 462a001..0629863 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
Un proyecto texto-plano.xyz