|
From: <di...@us...> - 2007-02-04 23:35:34
|
Revision: 373
http://safekeep.svn.sourceforge.net/safekeep/?rev=373&view=rev
Author: dimi
Date: 2007-02-04 15:35:32 -0800 (Sun, 04 Feb 2007)
Log Message:
-----------
Add automatic validation for the deployed HTML and CSS
Modified Paths:
--------------
website/trunk/Makefile
Modified: website/trunk/Makefile
===================================================================
--- website/trunk/Makefile 2007-02-04 23:07:34 UTC (rev 372)
+++ website/trunk/Makefile 2007-02-04 23:35:32 UTC (rev 373)
@@ -1,3 +1,10 @@
+SITE_ADDRESS=safekeep.sourceforge.net
+HTML_VALID_URL=http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2F$(SITE_ADDRESS)%2F
+HTML_VALID_OK=Passed validation
+CSS_VALID_URL=http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F$(SITE_ADDRESS)%2F
+CSS_VALID_OK=Congratulations!
+SF_SERVER=shell.sourceforge.net
+SF_HOME=/home/groups/s/sa/safekeep
all: help
@@ -5,10 +12,19 @@
@echo "Targets:"
@echo " help Displays this message"
@echo " deploy Deploys teh website to SourceForge"
+ @echo " test Test the validity of the HTML and the CSS"
@echo " clean Cleans up the source tree"
deploy:
- cd WebContent; tar cfz - *.shtml *.html images/*.gif theme/*.css | ssh shell.sourceforge.net "cd /home/groups/s/sa/safekeep/htdocs; tar xfvz -"
+ cd WebContent; tar cfz - *.html *.shtml images/*.gif theme/*.css | ssh $(SF_SERVER) "cd $(SF_HOME)/htdocs; tar xfvz -"
+test: test-html test-css
+
+test-html:
+ cd WebContent; for page in *.html *.shtml; do if lynx -source "${HTML_VALID_URL}$$page" | grep -q '${HTML_VALID_OK}'; then echo "$$page: HTML OK"; else echo "$$page: HTML validation failed! ***"; fi; done
+
+test-css:
+ cd WebContent; for page in *.html *.shtml; do if lynx -source "${CSS_VALID_URL}$$page" | grep -q '${CSS_VALID_OK}'; then echo "$$page: CSS OK"; else echo "$$page: CSS validation failed! ***"; fi; done
+
clean:
rm -f WebContent/*~ WebContent/*.bak
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|