Makefile (673B) - raw


      1 DST = /srv/oscarbenedito.com
      2 
      3 .PHONY: site server blogroll deploy brokenlinks loc clean
      4 
      5 site:
      6 	python3 gensite.py
      7 
      8 server: site
      9 	git ls-files | entr make &
     10 	python3 -m http.server --bind localhost --directory _site
     11 
     12 blogroll:
     13 	python3 misc/update-blogroll.py
     14 
     15 deploy:
     16 	git fetch origin master
     17 	git reset --hard origin/master
     18 	git verify-commit master
     19 	git submodule foreach 'git fetch origin master; git reset --hard $$sha1'
     20 	python3 gensite.py
     21 	rsync --perms --recursive --checksum --delete _site/ $(DST)
     22 
     23 brokenlinks:
     24 	muffet -t 60 -c 10 http://oscarbenedito.com
     25 
     26 loc:
     27 	grep -vE '^[[:space:]]*#|^[[:space:]]*$$|^[[:space:]]*"""' gensite.py | wc -l
     28 
     29 clean:
     30 	rm -rf _site