You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2016/05/09 23:29:48 UTC

[whimsy] branch master updated: Drop timestamps so only real changes are saved/reported

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  a8384d1   Drop timestamps so only real changes are saved/reported
a8384d1 is described below

commit a8384d1d697d904fe27fcc620bd8b011715951ff
Author: Sebb <se...@apache.org>
AuthorDate: Tue May 10 00:29:39 2016 +0100

    Drop timestamps so only real changes are saved/reported
---
 www/roster/public_json_common.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/www/roster/public_json_common.rb b/www/roster/public_json_common.rb
index 7d1cb16..13e99bb 100644
--- a/www/roster/public_json_common.rb
+++ b/www/roster/public_json_common.rb
@@ -69,10 +69,15 @@ def public_json_output_file(info, file)
 
 end
 
+# Massage the strings to drop the timestamps so spurious changes are not reported/saved
+def removeTimestamps(s)
+  return s.sub(/  "last_updated": "[^"]+",/, '')
+end
+
 # Write formatted output to specific file
 def write_output(file, results)
 
-  if not File.exist?(file) or File.read(file).chomp != results
+  if not File.exist?(file) or removeTimestamps(File.read(file).chomp) != removeTimestamps(results)
 
     Wunderbar.info "git_info: #{GITINFO} - creating/updating #{file}"
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].