You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-commits@incubator.apache.org by to...@apache.org on 2010/11/06 12:56:03 UTC
[zeta-commits] svn commit: r1032032 - /incubator/zetacomponents/website/Makefile
Author: toby
Date: Sat Nov 6 12:56:03 2010
New Revision: 1032032
URL: http://svn.apache.org/viewvc?rev=1032032&view=rev
Log:
- Implemented: Make target to revert changed htdocs/ files, which actually
don't have changes.
Modified:
incubator/zetacomponents/website/Makefile
Modified: incubator/zetacomponents/website/Makefile
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/website/Makefile?rev=1032032&r1=1032031&r2=1032032&view=diff
==============================================================================
--- incubator/zetacomponents/website/Makefile (original)
+++ incubator/zetacomponents/website/Makefile Sat Nov 6 12:56:03 2010
@@ -189,3 +189,26 @@ docs : tutorials extract-phpdoc
website : checkout-wcv extract-phpdoc
env php scripts/updateCache.php
+# Reverts all files without real changes
+#
+# Regenerating the website may cause files to appear changed, which don't have
+# real changes. Especially the phpDoc files change their creation data and
+# therefore the HTML meta data. These changes are automatically reverted using
+# this script, so that you don't commit such "empty" changes.
+revert-empty:
+ REVERT_FILES=""; \
+ echo "Scanning for files to revert â¦"; \
+ for FILE in `svn st htdocs/ | grep '^M' | awk '{ print $$2; }'`; \
+ do \
+ if [ "`svn diff --diff-cmd 'diff' -x -U0 $$FILE | sed '1,4d' | grep -v -f 'var/scripts/htdocs_ignore.grep'`" = "" ]; \
+ then \
+ REVERT_FILES="$$REVERT_FILES '$$FILE'"; \
+ fi; \
+ done; \
+ if [ "$$REVERT_FILES" = "" ]; \
+ then \
+ echo "No files to be reverted."; \
+ else \
+ echo "Reverting files â¦"; \
+ echo "$$REVERT_FILES" | xargs svn revert; \
+ fi; \