]> git.donarmstrong.com Git - neurodebian.git/commitdiff
ENH: new target upload-website-stamp
authorYaroslav Halchenko <debian@onerussian.com>
Mon, 26 Sep 2011 19:11:54 +0000 (15:11 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Mon, 26 Sep 2011 19:11:54 +0000 (15:11 -0400)
it should not invoke rebuild/upload if GIT repository has not being changed since last website upload

Makefile

index 2d6b52360da01300509df06dc7a325e548219dc5..4b9e35a7c432e465bdc0be57ec29b89b60395f49 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ html: pics source
 
 
 clean:
-       -rm html-stamp source-stamp
+       -rm html-stamp source-stamp upload-website-stamp
        $(MAKE) -C artwork clean
 
 
@@ -64,6 +64,12 @@ upload-website: html
        rsync -rvzlhp --delete \
         --exclude=debian --exclude=debian-local --exclude=_files \
         --chmod=Dg+s,g+rw $(WWW_DIR) $(WWW_UPLOAD_URI)
+       : # Touch stamp here so we get it updated on every upload
+       touch $@-stamp
+
+# call upload iff .git/index was modified, i.e. new changes got pulled in
+upload-website-stamp: .git/index
+       $(MAKE) upload-website
 
 .PHONY: removedb removecache updatedb upload-website clean distclean pics html