From ad7b9275f112bc15bae979951cfe81a80e9a8b1c Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Wed, 16 Sep 2015 17:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E6=96=87=E4=BB=B6=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/release_static.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/release_static.py b/tools/release_static.py index f937ae3..2ab87e5 100644 --- a/tools/release_static.py +++ b/tools/release_static.py @@ -36,7 +36,6 @@ name_map = {} def process(match): file_path = match.group(1).replace("/static/", "") - print "Processing: " + file_path if not os.path.exists(static_release_path + file_path): return match.group(0) @@ -55,9 +54,11 @@ def process(match): return match.group(0) +print "Begin to add md5 stamp in html" for root, dirs, files in os.walk(template_release_path): for name in files: html_path = os.path.join(root, name) + print "Processing: " + html_path html_content = open(html_path, "r").read() js_replaced_html_content = re.sub(js_re, process, html_content) css_replaced_html_content = re.sub(css_re, process, js_replaced_html_content) @@ -66,4 +67,4 @@ for root, dirs, files in os.walk(template_release_path): f.write(css_replaced_html_content) f.close() -print "Done" \ No newline at end of file +print "Done"